Class WithinClusterMeanDistance

    • Constructor Detail

      • WithinClusterMeanDistance

        public WithinClusterMeanDistance()
    • Method Detail

      • quality

        public <V extends NumberVector> double quality​(Clustering<? extends MeanModel> clustering,
                                                       NumberVectorDistance<? super V> distance,
                                                       Relation<V> relation)
        Description copied from interface: KMeansQualityMeasure
        Calculates and returns the quality measure.
        Specified by:
        quality in interface KMeansQualityMeasure<NumberVector>
        Type Parameters:
        V - Actual vector type (could be a subtype of O!)
        clustering - Clustering to analyze
        distance - Distance function to use (usually Euclidean or squared Euclidean!)
        relation - Relation for accessing objects
        quality measure
      • isBetter

        public boolean isBetter​(double currentCost,
                                double bestCost)
        Description copied from interface: KMeansQualityMeasure
        Compare two scores.
        Specified by:
        isBetter in interface KMeansQualityMeasure<NumberVector>
        currentCost - New (candiate) cost/score
        bestCost - Existing best cost/score (may be NaN)
        true when the new score is better, or the old score is NaN.