Class CalinskiHarabasz
- java.lang.Object
-
- org.apache.commons.math4.legacy.ml.clustering.evaluation.CalinskiHarabasz
-
- All Implemented Interfaces:
ClusterEvaluator
public class CalinskiHarabasz extends Object implements ClusterEvaluator
Compute the Calinski and Harabasz score.It is also known as the Variance Ratio Criterion.
The score is defined as ratio between the within-cluster dispersion and the between-cluster dispersion.
- See Also:
- A dendrite method for cluster analysis
-
-
Constructor Summary
Constructors Constructor Description CalinskiHarabasz()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisBetterScore(double a, double b)Provides a means to interpret thescore value.doublescore(List<? extends Cluster<? extends Clusterable>> clusters)
-
-
-
Constructor Detail
-
CalinskiHarabasz
public CalinskiHarabasz()
-
-
Method Detail
-
score
public double score(List<? extends Cluster<? extends Clusterable>> clusters)
- Specified by:
scorein interfaceClusterEvaluator- Parameters:
clusters- List of clusters.- Returns:
- the score attributed by the evaluator.
-
isBetterScore
public boolean isBetterScore(double a, double b)
Provides a means to interpret thescore value.- Specified by:
isBetterScorein interfaceClusterEvaluator- Parameters:
a- Score computed by this evaluator.b- Score computed by this evaluator.- Returns:
trueif the evaluator considers that scoreais better than scoreb.
-
-