residualVariance
function residualVariance(m): MetricResult;Defined in: metrics/correlation.ts:38
The share of distance variance the projection fails to explain.
Simply 1 - r² of pearsonR, restated so that lower is better and the
number reads as “proportion of structure lost”.
- Needs: high-dimensional data and projection. No labels.
- Range: [0, 1], lower is better.
- Cost: O(1), from an O(N²·D) pass.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
m | DistanceMoments |
Returns
Section titled “Returns”Tenenbaum, de Silva & Langford, Science 290 (2000) https://doi.org/10.1126/science.290.5500.2319
Example
Section titled “Example”import { analyze, residualVariance } from "@saehrimnir/sickle";
const a = analyze(data, projection);residualVariance(a.moments).value; // 0.0066 — 1 - r², so lower is better