Compute Geodesic-Isometry Diagnostics
Source:R/isometry_deviation.R
isometry.geodesic.diagnostics.RdComputes 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().
Arguments
- D.estimated
Estimated distance matrix or
distobject.- D.true
Ground-truth distance matrix or
distobject.- scale
Logical scalar. If
TRUE, useisometry.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 target-normalized graph-geodesic relative
RMSE, signed residual bias, shortcut fraction, relative absolute residual
quantiles, and median signed relative residuals in short/mid/long
reference-distance bands. The relative-RMSE entry retains the historical
name rel_geodesic_stress; it is not Kruskal's Stress-1.
Examples
D <- as.matrix(dist(1:4))
isometry.geodesic.diagnostics(1.1 * D, D)
#> rel_geodesic_stress signed_bias shortcut_fraction
#> 1.289963e-16 -1.221245e-16 1.000000e+00
#> q50_rel_abs_residual q90_rel_abs_residual q95_rel_abs_residual
#> 1.110223e-16 1.295260e-16 1.387779e-16
#> short_band_bias mid_band_bias long_band_bias
#> -1.110223e-16 -1.110223e-16 -1.480297e-16