silhouetteMetric
silhouetteMetric(
points,labels):number
Defined in: src/silhouette_metric.js:17
Calculate the silhouette metric for a set of N-dimensional points arranged in groups. The metric is the largest individual silhouette value for the data.
Parameters
Section titled “Parameters”points
Section titled “points”number[][]
N-dimensional coordinates of points.
labels
Section titled “labels”number[]
Labels of points. This must be the same length as points,
and values must lie in [0..G-1], where G is the number of groups.
Returns
Section titled “Returns”number
The silhouette metric for the groupings.
Example
Section titled “Example”silhouetteMetric([[0.25], [0.75]], [0, 0]); // => 1.0