Enum ClusteringMetrics

java.lang.Object
java.lang.Enum<ClusteringMetrics>
org.tribuo.clustering.evaluation.ClusteringMetrics
All Implemented Interfaces:
Serializable, Comparable<ClusteringMetrics>, java.lang.constant.Constable

Default metrics for evaluating clusterings.
  • Enum Constant Details

  • Method Details

    • values

      public static ClusteringMetrics[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ClusteringMetrics valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getImpl

      public BiFunction<MetricTarget<ClusterID>, org.tribuo.clustering.evaluation.ClusteringMetric.Context, Double> getImpl()
    • forTarget

    • adjustedMI

      public static double adjustedMI(org.tribuo.clustering.evaluation.ClusteringMetric.Context context)
      Calculates the adjusted normalized mutual information between two clusterings.
      Parameters:
      context - The context containing the predicted clustering and the ground truth.
      Returns:
      The adjusted normalized mutual information.
    • normalizedMI

      public static double normalizedMI(org.tribuo.clustering.evaluation.ClusteringMetric.Context context)
      Calculates the normalized mutual information between two clusterings.
      Parameters:
      context - The context containing the predicted clustering and the ground truth.
      Returns:
      The normalized mutual information.