Package elki.evaluation.clustering
Class ClusterContingencyTable
- java.lang.Object
-
- elki.evaluation.clustering.ClusterContingencyTable
-
public class ClusterContingencyTable extends java.lang.ObjectClass storing the contingency table and related data on two clusterings.- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected BCubedbcubedBCubed measuresprotected booleanbreakNoiseClustersNoise cluster handlingprotected int[][]contingencyContingency matrixprotected EditDistanceeditEdit-Distance measuresprotected EntropyentropyEntropy-based measuresprotected MaximumMatchingAccuracymmaccMaximum Matching Accuracyprotected long[]noise1Noise flagsprotected long[]noise2Noise flagsprotected PairCountingpaircountPair counting measuresprotected PairSetsIndexpsiPair Sets Index Measuresprotected booleanselfPairingSelf pairingprotected intsize1Number of clusters.protected intsize2Number of clusters.protected SetMatchingPuritysmpSet matching purity measures
-
Constructor Summary
Constructors Constructor Description ClusterContingencyTable(boolean selfPairing, boolean breakNoiseClusters, Clustering<?> result1, Clustering<?> result2)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MeanVarianceadjustedSymmetricGini()Compute the adjusted average Gini for each cluster (in both clusterings - symmetric).MeanVarianceaverageSymmetricGini()Compute the average Gini for each cluster (in both clusterings - symmetric).BCubedgetBCubed()The BCubed based measuresEditDistancegetEdit()Get (compute) the edit-distance based measuresEntropygetEntropy()Get (compute) the entropy based measuresMaximumMatchingAccuracygetMaximumMatchingAccuracy()The Maximum Matching AccuracyPairCountinggetPaircount()Get (compute) the pair counting measures.PairSetsIndexgetPairSetsIndex()The Pair Sets Index measuresSetMatchingPuritygetSetMatchingPurity()The set-matching purity measuresbooleanisStrictPartitioning()Check whether the marginal cluster sizes both sum to the total size.java.lang.StringtoString()
-
-
-
Field Detail
-
breakNoiseClusters
protected boolean breakNoiseClusters
Noise cluster handling
-
selfPairing
protected boolean selfPairing
Self pairing
-
size1
protected int size1
Number of clusters.
-
size2
protected int size2
Number of clusters.
-
contingency
protected int[][] contingency
Contingency matrix
-
noise1
protected long[] noise1
Noise flags
-
noise2
protected long[] noise2
Noise flags
-
paircount
protected PairCounting paircount
Pair counting measures
-
entropy
protected Entropy entropy
Entropy-based measures
-
smp
protected SetMatchingPurity smp
Set matching purity measures
-
mmacc
protected MaximumMatchingAccuracy mmacc
Maximum Matching Accuracy
-
psi
protected PairSetsIndex psi
Pair Sets Index Measures
-
edit
protected EditDistance edit
Edit-Distance measures
-
bcubed
protected BCubed bcubed
BCubed measures
-
-
Constructor Detail
-
ClusterContingencyTable
public ClusterContingencyTable(boolean selfPairing, boolean breakNoiseClusters, Clustering<?> result1, Clustering<?> result2)Constructor.- Parameters:
selfPairing- Build self-pairsbreakNoiseClusters- Break noise clusters into individual objectsresult1- First clusteringresult2- Second clustering
-
-
Method Detail
-
isStrictPartitioning
public boolean isStrictPartitioning()
Check whether the marginal cluster sizes both sum to the total size.- Returns:
truewhen the clustering is a non-overlapping complete partitioning of the data set
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getPaircount
public PairCounting getPaircount()
Get (compute) the pair counting measures.- Returns:
- Pair counting measures
-
getEntropy
public Entropy getEntropy()
Get (compute) the entropy based measures- Returns:
- Entropy based measures
-
getEdit
public EditDistance getEdit()
Get (compute) the edit-distance based measures- Returns:
- Edit-distance based measures
-
getBCubed
public BCubed getBCubed()
The BCubed based measures- Returns:
- BCubed measures
-
getSetMatchingPurity
public SetMatchingPurity getSetMatchingPurity()
The set-matching purity measures- Returns:
- Set-Matching purity measures
-
getMaximumMatchingAccuracy
public MaximumMatchingAccuracy getMaximumMatchingAccuracy()
The Maximum Matching Accuracy- Returns:
- Maximum Matching Accuracy
-
getPairSetsIndex
public PairSetsIndex getPairSetsIndex()
The Pair Sets Index measures- Returns:
- Pair Sets Index measures
-
averageSymmetricGini
public MeanVariance averageSymmetricGini()
Compute the average Gini for each cluster (in both clusterings - symmetric).- Returns:
- Mean and variance of Gini
-
adjustedSymmetricGini
public MeanVariance adjustedSymmetricGini()
Compute the adjusted average Gini for each cluster (in both clusterings - symmetric).- Returns:
- Mean and variance of Gini
-
-