Skip to contents

Computes quantiles of the calibrated pairwise distortion $$\rho_{ij}=\alpha\hat D_{ij}/D_{ij}.$$ Values near 1 indicate approximately isometric distance preservation.

Usage

isometry.distortion.quantiles(
  D.estimated,
  D.true,
  probs = c(0.05, 0.5, 0.95),
  scale = TRUE,
  true.tol = sqrt(.Machine$double.eps)
)

Arguments

D.estimated

Estimated distance matrix or dist object.

D.true

Ground-truth distance matrix or dist object.

probs

Numeric vector of probabilities passed to stats::quantile().

scale

Logical scalar. If TRUE, use isometry.scale() to optimally rescale estimated distances before computing the error.

true.tol

Non-negative tolerance. Pairs with true distance less than or equal to this value are excluded from relative metrics.

Value

Named numeric vector of distortion quantiles.

Examples

D <- as.matrix(dist(1:4))
isometry.distortion.quantiles(1.1 * D, D)
#>  5% 50% 95% 
#>   1   1   1