jsat.clustering.evaluation
Class NormalizedMutualInformation
- java.lang.Object
-
- jsat.clustering.evaluation.NormalizedMutualInformation
-
- All Implemented Interfaces:
- ClusterEvaluation
public class NormalizedMutualInformation extends java.lang.Object implements ClusterEvaluation
Normalized Mutual Information (NMI) is a measure to evaluate a cluster based on the true class labels for the data set. The NMI normally returns a value in [0, 1], where 0 indicates the clustering appears random, and 1 indicate the clusters perfectly match the class labels. To match theClusterEvaluationinterface, the value returned by evaluate will be 1.0-NMI .
NOTE: Because the NMI needs to know the true class labels, onlyevaluate(int[], jsat.DataSet)will work, since it provides the data set as an argument. The dataset given must be an instance ofClassificationDataSet
-
-
Constructor Summary
Constructors Constructor and Description NormalizedMutualInformation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description NormalizedMutualInformationclone()doubleevaluate(int[] designations, DataSet dataSet)Evaluates the clustering of the given clustering.doubleevaluate(java.util.List<java.util.List<DataPoint>> dataSets)Evaluates the clustering of the given set of clusters.
-
-
-
Method Detail
-
evaluate
public double evaluate(int[] designations, DataSet dataSet)Description copied from interface:ClusterEvaluationEvaluates the clustering of the given clustering.- Specified by:
evaluatein interfaceClusterEvaluation- Parameters:
designations- the array that stores the cluster assignments for each data point in the data setdataSet- the data set that contains all data points- Returns:
- a value in [0, Inf) that indicates the quality of the clustering.
-
evaluate
public double evaluate(java.util.List<java.util.List<DataPoint>> dataSets)
Description copied from interface:ClusterEvaluationEvaluates the clustering of the given set of clusters.- Specified by:
evaluatein interfaceClusterEvaluation- Parameters:
dataSets- a list of lists, where the size of the first index indicates the the number of clusters, and the list at each index is the data points that make up each cluster.- Returns:
- a value in [0, Inf) that indicates the quality of the clustering.
-
clone
public NormalizedMutualInformation clone()
- Specified by:
clonein interfaceClusterEvaluation- Overrides:
clonein classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG