Skip to content

trustworthinessCurve

function trustworthinessCurve(cr): Curve;

Defined in: metrics/neighborhood.ts:325

trustworthiness at every k at once.

Reading the curve is usually more informative than any single k: a projection faithful up close but wrong at range falls away to the right, and one that only captures coarse structure rises to the right.

Index the values array by k; entries outside [kMin, kMax] are NaN.

ParameterType
crCoRanking

Curve

import { analyze, trustworthinessCurve } from "@saehrimnir/sickle";
const a = analyze(data, projection); // number[][] straight in
const curve = trustworthinessCurve(a.coRanking);
curve.kMin; // 1
curve.kMax; // 100 — floor(n / 2) for this measure
curve.values[20]; // 0.9659 — index by k itself, not by position
curve.values[0]; // NaN — k = 0 is outside [kMin, kMax]