Skip to main content
Module

x/simplestatistics/index.js>silhouetteMetric

simple statistics for node & browser javascript
Go to Latest
function silhouetteMetric
import { silhouetteMetric } from "https://deno.land/x/simplestatistics@v7.7.5/index.js";

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.

Examples

silhouetteMetric([[0.25], [0.75]], [0, 0]); // => 1.0

Parameters

points

N-dimensional coordinates of points.

labels

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.