Class CIndex<O>
- java.lang.Object
-
- elki.evaluation.clustering.internal.CIndex<O>
-
- All Implemented Interfaces:
Evaluator
,ResultProcessor
@Reference(authors="L. J. Hubert, J. R. Levin", title="A general statistical framework for assessing categorical clustering in free recall", booktitle="Psychological Bulletin, Vol. 83(6)", url="https://doi.org/10.1037/0033-2909.83.6.1072", bibkey="doi:10.1037/0033-2909.83.6.1072") public class CIndex<O> extends java.lang.Object implements Evaluator
Compute the C-index of a data set.Note: This requires pairwise distance computations, so it is not recommended to use this on larger data sets.
Reference:
L. J. Hubert, J. R. Levin
A general statistical framework for assessing categorical clustering in free recall
Psychological Bulletin, Vol. 83(6)- Since:
- 0.7.0
- Author:
- Stephan Baier, Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CIndex.Par<O>
Parameterization class.
-
Field Summary
Fields Modifier and Type Field Description private Distance<? super O>
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.
-
Constructor Summary
Constructors Constructor Description CIndex(Distance<? super O> distance, NoiseHandling noiseOpt)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
evaluateClustering(Relation<? extends O> rel, DistanceQuery<O> dq, Clustering<?> c)
Evaluate a single clustering.protected double
processCluster(Cluster<?> cluster, java.util.List<? extends Cluster<?>> clusters, int i, DistanceQuery<O> dq, DoubleHeap maxDists, DoubleHeap minDists, int w)
void
processNewResult(java.lang.Object result)
Process a result.protected void
processSingleton(Cluster<?> cluster, Relation<? extends O> rel, DistanceQuery<O> dq, DoubleHeap maxDists, DoubleHeap minDists, int w)
-
-
-
Field Detail
-
LOG
private static final Logging LOG
Logger for debug output.
-
noiseOption
private NoiseHandling noiseOption
Option for noise handling.
-
key
private java.lang.String key
Key for logging statistics.
-
-
Constructor Detail
-
CIndex
public CIndex(Distance<? super O> distance, NoiseHandling noiseOpt)
Constructor.- Parameters:
distance
- Distance functionnoiseOpt
- Flag to control noise handling
-
-
Method Detail
-
evaluateClustering
public double evaluateClustering(Relation<? extends O> rel, DistanceQuery<O> dq, Clustering<?> c)
Evaluate a single clustering.- Parameters:
rel
- Data relationc
- Clustering- Returns:
- C-Index
-
processCluster
protected double processCluster(Cluster<?> cluster, java.util.List<? extends Cluster<?>> clusters, int i, DistanceQuery<O> dq, DoubleHeap maxDists, DoubleHeap minDists, int w)
-
processSingleton
protected void processSingleton(Cluster<?> cluster, Relation<? extends O> rel, DistanceQuery<O> dq, DoubleHeap maxDists, DoubleHeap minDists, int w)
-
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.
-
-