Skip to content

trustworthiness

function trustworthiness(cr, k): number;

Defined in: metrics/neighborhood.ts:122

Are the neighbours you see in the projection real?

Penalises points that appear close together but were far apart in the data — the errors that make a viewer believe in a group that does not exist.

  • Needs: high-dimensional data and projection. No labels.
  • Range: [0, 1], higher is better. A random projection scores about 0.5, so read that as the practical floor rather than 0.
  • Cost: O(1), from an O(N² log N) pass.

k may not exceed maxKTrustworthiness(n) = floor(n / 2), which is where the normalisation stops being defined rather than an arbitrary limit.

ParameterType
crCoRanking
knumber

number

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

import { analyze, trustworthiness } from "@saehrimnir/sickle";
// `data` and `projection` are number[][]: 200 points, 8 columns and 2.
const a = analyze(data, projection); // one O(N²·D) sweep
trustworthiness(a.coRanking, 20); // 0.9659