isometry.geodesic.diagnostics: Compute Geodesic-Isometry Diagnostics

View source: R/isometry_deviation.R

isometry.geodesic.diagnosticsR Documentation

Compute Geodesic-Isometry Diagnostics

Description

Computes signed and scale-regime diagnostics for comparing estimated graph geodesic distances with reference geodesic distances. Distances are first optionally calibrated by the least-squares scale from isometry.scale().

Usage

isometry.geodesic.diagnostics(
  D.estimated,
  D.true,
  scale = TRUE,
  true.tol = sqrt(.Machine$double.eps),
  band.probs = c(1/3, 2/3)
)

Arguments

D.estimated

Estimated distance matrix or dist object.

D.true

Ground-truth distance matrix or dist object.

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.

band.probs

Numeric vector of two probabilities used to split reference distances into short, middle, and long distance bands.

Value

Named numeric vector with relative geodesic stress, signed residual bias, shortcut fraction, relative absolute residual quantiles, and median signed relative residuals in short/mid/long reference-distance bands.

Examples

D <- as.matrix(dist(1:4))
isometry.geodesic.diagnostics(1.1 * D, D)


dgraphs documentation built on Aug. 21, 2026, 1:08 a.m.