org.carrot2.output.metrics
Class NormalizedMutualInformationMetric

java.lang.Object
  extended by org.carrot2.output.metrics.NormalizedMutualInformationMetric
All Implemented Interfaces:
IClusteringMetric

public class NormalizedMutualInformationMetric
extends Object

Computes Normalized Mutual Information (NMI) metric for the cluster set.

Metrics will be calculated only if all input documents have non-blank Document.PARTITIONS.


Field Summary
 List<Cluster> clusters
           
 List<Document> documents
           
 boolean enabled
          Calculate Normalized Mutual Information metric.
 Double normalizedMutualInformation
          Normalized Mutual Information of the whole cluster set.
 String partitionIdFieldName
          Partition id field name.
 
Constructor Summary
NormalizedMutualInformationMetric()
           
 
Method Summary
 void calculate()
          Triggers calculation of the metric.
 boolean isEnabled()
          Return true if this metric should be calculated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

normalizedMutualInformation

public Double normalizedMutualInformation
Normalized Mutual Information of the whole cluster set.


documents

public List<Document> documents

clusters

public List<Cluster> clusters

enabled

public boolean enabled
Calculate Normalized Mutual Information metric.


partitionIdFieldName

public String partitionIdFieldName
Partition id field name.

Constructor Detail

NormalizedMutualInformationMetric

public NormalizedMutualInformationMetric()
Method Detail

calculate

public void calculate()
Description copied from interface: IClusteringMetric
Triggers calculation of the metric. All Processing Input attributes will have been bound before a call to this method.


isEnabled

public boolean isEnabled()
Description copied from interface: IClusteringMetric
Return true if this metric should be calculated.



Copyright (c) Dawid Weiss, Stanislaw Osinski