jsat.clustering.evaluation
Class DunnIndex
- java.lang.Object
-
- jsat.clustering.evaluation.DunnIndex
-
- All Implemented Interfaces:
- ClusterEvaluation
public class DunnIndex extends java.lang.Object implements ClusterEvaluation
Computes the Dunn Index (DI) using a customizable manner. Normally, a higher DI value indicates a better value. In order to conform to the interface contract of a lower value indicating a better result, the value of 1/(1+DI) is returned.
-
-
Constructor Summary
Constructors Constructor and Description DunnIndex(DunnIndex toCopy)Copy constructorDunnIndex(IntraClusterEvaluation ice, ClusterDissimilarity cd)Creates a new DunnIndex
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description DunnIndexclone()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.
-
-
-
Constructor Detail
-
DunnIndex
public DunnIndex(IntraClusterEvaluation ice, ClusterDissimilarity cd)
Creates a new DunnIndex- Parameters:
ice- the metric to measure the quality of a single clustercd- the metric to measure the distance between two clusters
-
DunnIndex
public DunnIndex(DunnIndex toCopy)
Copy constructor- Parameters:
toCopy- the object to copy
-
-
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 DunnIndex clone()
- Specified by:
clonein interfaceClusterEvaluation- Overrides:
clonein classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG