public class WithinClusterMeanDistanceQualityMeasure extends Object implements KMeansQualityMeasure<NumberVector<?>,NumberDistance<?,?>>
Constructor and Description |
---|
WithinClusterMeanDistanceQualityMeasure() |
Modifier and Type | Method and Description |
---|---|
<V extends NumberVector<?>> |
calculateCost(Clustering<? extends MeanModel<V>> clustering,
PrimitiveDistanceFunction<? super V,? extends NumberDistance<?,?>> distanceFunction,
Relation<V> relation)
Calculates and returns the quality measure.
|
public WithinClusterMeanDistanceQualityMeasure()
public <V extends NumberVector<?>> double calculateCost(Clustering<? extends MeanModel<V>> clustering, PrimitiveDistanceFunction<? super V,? extends NumberDistance<?,?>> distanceFunction, Relation<V> relation)
KMeansQualityMeasure
calculateCost
in interface KMeansQualityMeasure<NumberVector<?>,NumberDistance<?,?>>
V
- Actual vector type (could be a subtype of O!)clustering
- Clustering to analyzedistanceFunction
- Distance function to use (usually Euclidean or
squared Euclidean!)relation
- Relation for accessing objects