View source: R/isometry_deviation.R
| isometry.scale | R Documentation |
Computes the least-squares scalar \alpha that aligns estimated
distances to true distances:
\alpha^* = \frac{\sum_{i<j} \hat D_{ij}D_{ij}}
{\sum_{i<j} \hat D_{ij}^2}.
isometry.scale(D.estimated, D.true, true.tol = sqrt(.Machine$double.eps))
D.estimated |
Estimated distance matrix or |
D.true |
Ground-truth distance matrix or |
true.tol |
Non-negative tolerance. Pairs with true distance less than or equal to this value are excluded from relative metrics. |
Numeric scalar calibration scale.
D <- as.matrix(dist(1:4))
isometry.scale(2 * D, D)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.