calinskiHarabasz
function calinskiHarabasz(ldIn, cl): MetricResult;Defined in: metrics/separability.ts:191
Ratio of between-class to within-class scatter.
Rewards classes that are tight and far apart. Unbounded above, so it is only meaningful when comparing projections of the same labelled dataset — the magnitude carries no absolute meaning.
- Needs: projection only. Labels required.
- Range: [0, ∞), higher is better.
- Cost: O(N·D).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ldIn | PointsInput |
cl | Clusters |
Returns
Section titled “Returns”Caliński & Harabasz, Comm. Statistics 3 (1974) https://doi.org/10.1080/03610927408827101
Example
Section titled “Example”import { clusters, calinskiHarabasz } from "@saehrimnir/sickle";
const cl = clusters(projection, labels);calinskiHarabasz(projection, cl).value; // 4686.8502// Unbounded: meaningless on its own, only comparable between projections of// the same points.