nervPass
function nervPass( hdIn, ldIn, opts?): Nerv;Defined in: passes/nerv.ts:280
NeRV in one call, single-threaded. See nerv for the metric itself.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
hdIn | PointsInput |
ldIn | PointsInput |
opts | NervOptions |
Returns
Section titled “Returns”Example
Section titled “Example”import { nervPass, nerv } from "@saehrimnir/sickle";
// Fits a per-point sigma in the data by bisection, then reuses it for the// projection. Defaults: lambda 0.5, perplexity 30.const p = nervPass(data, projection, { lambda: 0.5, perplexity: 30 });
nerv(p).value; // 0.4611p.recall; // 77.6049 — a scalar, as is p.precisionp.local[0]; // per-point contributions, localKind "mean"p.sigma[0]; // the bandwidth fitted for point 0