Class DaviesBouldinIndex
- java.lang.Object
-
- elki.evaluation.clustering.internal.DaviesBouldinIndex
-
- All Implemented Interfaces:
Evaluator
,ResultProcessor
@Reference(authors="D. L. Davies, D. W. Bouldin", title="A Cluster Separation Measure", booktitle="IEEE Transactions Pattern Analysis and Machine Intelligence 1(2)", url="https://doi.org/10.1109/TPAMI.1979.4766909", bibkey="DBLP:journals/pami/DaviesB79") public class DaviesBouldinIndex extends java.lang.Object implements Evaluator
Compute the Davies-Bouldin index of a data set.Reference:
D. L. Davies, D. W. Bouldin
A Cluster Separation Measure
IEEE Transactions Pattern Analysis and Machine Intelligence 1(2)- Since:
- 0.7.0
- Author:
- Stephan Baier
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DaviesBouldinIndex.Par
Parameterization class.
-
Field Summary
Fields Modifier and Type Field Description private NumberVectorDistance<?>
distance
Distance function to use.private java.lang.String
key
Key for logging statistics.private static Logging
LOG
Logger for debug output.private NoiseHandling
noiseOption
Option for noise handling.private double
p
Exponent p for computing the power mean.
-
Constructor Summary
Constructors Constructor Description DaviesBouldinIndex(NumberVectorDistance<?> distance, NoiseHandling noiseOpt, double p)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
evaluateClustering(Relation<? extends NumberVector> rel, Clustering<?> c)
Evaluate a single clustering.void
processNewResult(java.lang.Object result)
Process a result.double[]
withinGroupDistances(Relation<? extends NumberVector> rel, java.util.List<? extends Cluster<?>> clusters, NumberVector[] centroids)
-
-
-
Field Detail
-
LOG
private static final Logging LOG
Logger for debug output.
-
noiseOption
private NoiseHandling noiseOption
Option for noise handling.
-
distance
private NumberVectorDistance<?> distance
Distance function to use.
-
p
private double p
Exponent p for computing the power mean.
-
key
private java.lang.String key
Key for logging statistics.
-
-
Constructor Detail
-
DaviesBouldinIndex
public DaviesBouldinIndex(NumberVectorDistance<?> distance, NoiseHandling noiseOpt, double p)
Constructor.- Parameters:
distance
- Distance functionnoiseOpt
- Flag to control noise handlingp
- Power mean exponent p
-
-
Method Detail
-
evaluateClustering
public double evaluateClustering(Relation<? extends NumberVector> rel, Clustering<?> c)
Evaluate a single clustering.- Parameters:
rel
- Data relationc
- Clustering- Returns:
- DB-index
-
withinGroupDistances
public double[] withinGroupDistances(Relation<? extends NumberVector> rel, java.util.List<? extends Cluster<?>> clusters, NumberVector[] centroids)
-
processNewResult
public void processNewResult(java.lang.Object result)
Description copied from interface:ResultProcessor
Process a result.- Specified by:
processNewResult
in interfaceResultProcessor
- Parameters:
result
- Newly added result subtree.
-
-