distanceMoments
function distanceMoments( hdIn, ldIn, opts?): DistanceMoments;Defined in: passes/distances.ts:73
Delegates to the shared row loop in fused.ts with the rank accumulators
switched off, so there is exactly one implementation of the sweep.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
hdIn | PointsInput |
ldIn | PointsInput |
opts | DistancePassOptions |
Returns
Section titled “Returns”Example
Section titled “Example”import { distanceMoments, stress, pearsonR } from "@saehrimnir/sickle";
// The distance half of `analyze`, when you do not need the ranks — much// cheaper, since nothing has to be sorted.const m = distanceMoments(data, projection);
stress(m).value; // 0.0807pearsonR(m).value; // 0.9967