SumOfClusterVariances (Apache Commons Math 3.3 API)

org.apache.commons.math3.ml.clustering.evaluation

## Class SumOfClusterVariances<T extends Clusterable>

- java.lang.Object
- - org.apache.commons.math3.ml.clustering.evaluation.ClusterEvaluator<T>
  - - org.apache.commons.math3.ml.clustering.evaluation.SumOfClusterVariances<T>

- Type Parameters:
    `T` - the type of the clustered points

      public class SumOfClusterVariances<T extends Clusterable>
      extends ClusterEvaluator<T>

  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
  Version:
    $Id: SumOfClusterVariances.java 1542545 2013-11-16 18:48:48Z tn $

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SumOfClusterVariances(DistanceMeasure measure)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `score(List<? extends Cluster<T>> clusters)` Computes the evaluation score for the given list of clusters.

    - ### Methods inherited from class org.apache.commons.math3.ml.clustering.evaluation.ClusterEvaluator

      `centroidOf, distance, isBetterScore`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SumOfClusterVariances

          public SumOfClusterVariances(DistanceMeasure measure)

      Parameters:
        `measure` - the distance measure to use

  - ### Method Detail

    - #### score

          public double score(List<? extends Cluster<T>> clusters)

      Description copied from class: `ClusterEvaluator`
      Computes the evaluation score for the given list of clusters.
      Specified by:
        `score` in class `ClusterEvaluator<T extends Clusterable>`
      Parameters:
        `clusters` - the clusters to evaluate
      Returns:
        the computed score

Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.