Top Description Constructors Methods
org.apache.commons.math3.ml.clustering.evaluation

public Class SumOfClusterVariances<T extends Clusterable>

extends ClusterEvaluator<T extends Clusterable>
Class Inheritance
Type Parameters
<T>
the type of the clustered points
Imports
java.util.List, org.apache.commons.math3.ml.clustering.Cluster, .Clusterable, org.apache.commons.math3.ml.distance.DistanceMeasure, org.apache.commons.math3.stat.descriptive.moment.Variance

Computes the sum of intra-cluster distance variances according to the formula:
\( score = \sum\limits_{i=1}^n \sigma_i^2 \)
where n is the number of clusters and \( \sigma_i^2 \) is the variance of intra-cluster distances of cluster \( c_i \).
Since
3.3

Constructor Summary

AccessConstructor and Description
public
SumOfClusterVariances(final DistanceMeasure
the distance measure to use
measure
)

Method Summary

Modifier and TypeMethod and Description
public double
score(final List<? extends Cluster<T>>
the clusters to evaluate
clusters
)

Implements abstract org.apache.commons.math3.ml.clustering.evaluation.ClusterEvaluator.score.

Computes the evaluation score for the given list of clusters.

Inherited from org.apache.commons.math3.ml.clustering.evaluation.ClusterEvaluator:
centroidOfdistanceisBetterScore

Constructor Detail

SumOfClusterVariancesback to summary
public SumOfClusterVariances(final DistanceMeasure measure)
Parameters
measure:DistanceMeasure

the distance measure to use

Method Detail

scoreback to summary
public double score(final List<? extends Cluster<T>> clusters)

Implements abstract org.apache.commons.math3.ml.clustering.evaluation.ClusterEvaluator.score.

Doc from org.apache.commons.math3.ml.clustering.evaluation.ClusterEvaluator.score.

Computes the evaluation score for the given list of clusters.

Parameters
clusters:List<? extends Cluster<T>>

the clusters to evaluate

Returns:double

the computed score

Annotations
@Override