Class EvaluateClustering

  • All Implemented Interfaces:
    Evaluator, ResultProcessor

    public class EvaluateClustering
    extends java.lang.Object
    implements Evaluator
    Evaluate a clustering result by comparing it to an existing cluster label.
    Since:
    0.4.0
    Author:
    Erich Schubert
    • Field Detail

      • LOG

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

        private boolean noiseSpecialHandling
        Apply special handling to noise "clusters".
      • selfPairing

        private boolean selfPairing
        Use self-pairing in pair-counting measures
    • Constructor Detail

      • EvaluateClustering

        public EvaluateClustering​(ClusteringAlgorithm<?> referencealg,
                                  boolean noiseSpecialHandling,
                                  boolean selfPairing)
        Constructor.
        Parameters:
        referencealg - Reference clustering
        noiseSpecialHandling - Noise handling flag
        selfPairing - Self-pairing flag
    • Method Detail

      • evaluateRanking

        public static double evaluateRanking​(ScoreEvaluation eval,
                                             Cluster<?> clus,
                                             DoubleDBIDList ranking)
        Evaluate given a cluster (of positive elements) and a scoring list.
        Parameters:
        eval - Evaluation method
        clus - Cluster object
        ranking - Object ranking
        Returns:
        Score
      • processNewResult

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

        protected void evaluteResult​(Database db,
                                     Clustering<?> c,
                                     Clustering<?> refc)
        Evaluate a clustering result.
        Parameters:
        db - Database
        c - Clustering
        refc - Reference clustering
      • isReferenceResult

        private boolean isReferenceResult​(Clustering<?> t)
        Test if a clustering result is a valid reference result.
        Parameters:
        t - Clustering to test.
        Returns:
        true if it is considered to be a reference result.