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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cr | CoRanking |
Returns
Section titled “Returns”Example
Section titled “Example”import { analyze, trustworthinessCurve } from "@saehrimnir/sickle";
const a = analyze(data, projection); // number[][] straight inconst curve = trustworthinessCurve(a.coRanking);
curve.kMin; // 1curve.kMax; // 100 — floor(n / 2) for this measurecurve.values[20]; // 0.9659 — index by k itself, not by positioncurve.values[0]; // NaN — k = 0 is outside [kMin, kMax]