averageBetweenWithin
function averageBetweenWithin(ldIn, cl): MetricResult;Defined in: metrics/separability.ts:302
Mean distance between classes divided by mean distance within them.
The simplest possible separation ratio.
- Needs: projection only. Labels required.
- Range: [0, ∞), higher is better. 1 means between- and within-class distances are alike, i.e. no separation.
- Cost: O(N²·D).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ldIn | PointsInput |
cl | Clusters |
Returns
Section titled “Returns”Example
Section titled “Example”import { clusters, averageBetweenWithin } from "@saehrimnir/sickle";
const cl = clusters(projection, labels);averageBetweenWithin(projection, cl).value; // 10.7873// 1 means between- and within-class distances are alike, i.e. no separation.