Class VarianceRatioCriterion

  • All Implemented Interfaces:
    Evaluator, ResultProcessor

    @Reference(authors="R. B. Calinski, J. Harabasz",
               title="A dendrite method for cluster analysis",
               booktitle="Communications in Statistics - Theory and Methods 3(1)",
               url="https://doi.org/10.1080/03610927408827101",
               bibkey="doi:10.1080/03610927408827101")
    @Alias("calinski-harabasz")
    public class VarianceRatioCriterion
    extends java.lang.Object
    implements Evaluator
    Compute the Variance Ratio Criterion of a data set, also known as Calinski-Harabasz index.

    Reference:

    R. B. Calinski, J. Harabasz
    A dendrite method for cluster analysis
    Communications in Statistics - Theory and Methods 3(1)

    Since:
    0.7.0
    Author:
    Stephan Baier, Erich Schubert
    • Field Detail

      • LOG

        private static final Logging LOG
        Logger for debug output.
      • noiseOption

        private NoiseHandling noiseOption
        Option for noise handling.
      • key

        private java.lang.String key
        Key for logging statistics.
    • Constructor Detail

      • VarianceRatioCriterion

        public VarianceRatioCriterion​(NoiseHandling noiseOption,
                                      boolean penalize)
        Constructor.
        Parameters:
        noiseOption - Flag to control noise handling
        penalize - noise, if NoiseHandling.IGNORE_NOISE is set.
    • Method Detail

      • evaluateClustering

        public double evaluateClustering​(Relation<? extends NumberVector> rel,
                                         Clustering<?> c)
        Evaluate a single clustering.
        Parameters:
        rel - Data relation
        c - Clustering
        Returns:
        Variance Ratio Criteria
      • globalCentroid

        public static int globalCentroid​(Centroid overallCentroid,
                                         Relation<? extends NumberVector> rel,
                                         java.util.List<? extends Cluster<?>> clusters,
                                         NumberVector[] centroids,
                                         NoiseHandling noiseOption)
        Update the global centroid.
        Parameters:
        overallCentroid - Centroid to udpate
        rel - Data relation
        clusters - Clusters
        centroids - Cluster centroids
        Returns:
        Number of clusters
      • processNewResult

        public void processNewResult​(java.lang.Object result)
        Description copied from interface: ResultProcessor
        Process a result.
        Specified by:
        processNewResult in interface ResultProcessor
        Parameters:
        result - Newly added result subtree.