Click or drag to resize
Accord.NET (logo)

MeanShiftClusterCollectionDistortion Method

Calculates the average square distance from the data points to the nearest clusters' centroids.

Namespace:  Accord.MachineLearning
Assembly:  Accord.MachineLearning (in Accord.MachineLearning.dll) Version: 3.8.0
Syntax
public double Distortion(
	double[][] data,
	int[] labels = null,
	double[] weights = null
)
Request Example View Source

Parameters

data
Type: SystemDouble
labels (Optional)
Type: SystemInt32
weights (Optional)
Type: SystemDouble

Return Value

Type: Double
The average square distance from the data points to the nearest clusters' centroids.
Remarks
The average distance from centroids can be used as a measure of the "goodness" of the clustering. The more the data are aggregated around the centroids, the less the average distance.
See Also