snc
function snc( hdIn, ldIn, opts?): Snc;Defined in: passes/snc.ts:180
Does the projection show the right groups?
Judges clusters rather than points, which is where scatterplots actually mislead: one that splits a real group in two, or fuses two into one, can still score well on trustworthiness because no single neighbourhood is badly wrong.
-
Steadiness — are the groups you see real? Low means the projection shows groups that are not in the data.
-
Cohesiveness — are the data’s groups still together? Low means the projection hides groups that are there.
-
Needs: high-dimensional data and projection. No labels.
-
Range: both [0, 1], higher is better.
-
Cost: O(N²) time and O(N²) memory;
maxPointsdefaults to 6000.
Stochastic: clusters are drawn by random walks, so the result is an estimate.
seed makes a run reproducible and more iterations narrows the spread (about
±0.005 at the default 150). Treat small differences as noise.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
hdIn | PointsInput |
ldIn | PointsInput |
opts | SncOptions |
Returns
Section titled “Returns”Jeon, Ko, Jo, Yi & Seo, IEEE TVCG 28 (2022) https://doi.org/10.1109/TVCG.2021.3114833
Example
Section titled “Example”import { snc } from "@saehrimnir/sickle";
// Stochastic: it draws clusters by a random walk, so fix `seed` to reproduce.const s = snc(data, projection, { iterations: 150, seed: 1212 });
s.steadiness; // 0.9216 — are drawn groups real?s.cohesiveness; // are real groups drawn together?
// Per-point contributions are opt-in:const withLocal = snc(data, projection, { local: true });withLocal.localSteadiness?.[0];