Class DaviesBouldin
- java.lang.Object
-
- ristretto.jmltools.clustering.evaluation.DaviesBouldin
-
- All Implemented Interfaces:
net.sf.javaml.clustering.evaluation.ClusterEvaluation
public class DaviesBouldin extends java.lang.Object implements net.sf.javaml.clustering.evaluation.ClusterEvaluation
This class implements the CVI proposed by Davies and Bouldin in [1].[1] D. L. Davies and D. W. Bouldin. A clustering separation measure. IEEE Transactions on Pattern Analysis and Machine Intelligence, 1:224-227, 1979. https://doi.org/10.1109/TPAMI.1979.4766909
-
-
Constructor Summary
Constructors Constructor Description DaviesBouldin()
Construct a new evaluator that will use the Euclidean distance to measure the errors.DaviesBouldin(net.sf.javaml.distance.DistanceMeasure dm)
Construct a new evaluator that will use the supplied distance metric to measure the errors
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
compareScore(double score1, double score2)
Compare the two scores according to the criterion in the implementation.double
score(net.sf.javaml.core.Dataset[] clusters)
Return the score the current clusterer obtains on the dataset
-
-
-
Constructor Detail
-
DaviesBouldin
public DaviesBouldin()
Construct a new evaluator that will use the Euclidean distance to measure the errors.
-
DaviesBouldin
public DaviesBouldin(net.sf.javaml.distance.DistanceMeasure dm)
Construct a new evaluator that will use the supplied distance metric to measure the errors- Parameters:
dm
- Distance measure to be used in the evaluator
-
-
Method Detail
-
score
public double score(net.sf.javaml.core.Dataset[] clusters)
Return the score the current clusterer obtains on the dataset- Specified by:
score
in interfacenet.sf.javaml.clustering.evaluation.ClusterEvaluation
- Parameters:
clusters
- Clusters to be evaluated- Returns:
- The score the clusterer obtained on this particular dataset
-
compareScore
public boolean compareScore(double score1, double score2)
Compare the two scores according to the criterion in the implementation. Some criterions should be maximized, others should be minimized. This method returns true if the second score is 'better' than the first one- Specified by:
compareScore
in interfacenet.sf.javaml.clustering.evaluation.ClusterEvaluation
- Parameters:
score1
- The first scorescore2
- The second score- Returns:
- true if the second score is better than the first, false in all other cases
-
-