Skip to content

continuity

function continuity(cr, k): number;

Defined in: metrics/neighborhood.ts:157

Are the data’s neighbours still together in the projection?

The mirror of trustworthiness: it penalises points that were close in the data but got pushed apart — structure the projection hides rather than invents.

  • Needs: high-dimensional data and projection. No labels.
  • Range: [0, 1], higher is better; about 0.5 for a random projection.
  • Cost: O(1), from an O(N² log N) pass.

k may not exceed maxKTrustworthiness(n) = floor(n / 2), as for trustworthiness — the two share a normaliser.

ParameterType
crCoRanking
knumber

number

Venna & Kaski, Neural Networks 19 (2006) https://doi.org/10.1016/j.neunet.2006.05.014

import { analyze, trustworthiness, continuity } from "@saehrimnir/sickle";
const a = analyze(data, projection); // number[][] straight in
// Read both: they catch opposite failures and share one sweep.
trustworthiness(a.coRanking, 20); // 0.9659 — invented neighbours
continuity(a.coRanking, 20); // 0.9709 — hidden neighbours