Package elki.evaluation.clustering
Class ClusterContingencyTable
- java.lang.Object
-
- elki.evaluation.clustering.ClusterContingencyTable
-
public class ClusterContingencyTable extends java.lang.Object
Class 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 BCubed
bcubed
BCubed measuresprotected boolean
breakNoiseClusters
Noise cluster handlingprotected int[][]
contingency
Contingency matrixprotected EditDistance
edit
Edit-Distance measuresprotected Entropy
entropy
Entropy-based measuresprotected MaximumMatchingAccuracy
mmacc
Maximum Matching Accuracyprotected long[]
noise1
Noise flagsprotected long[]
noise2
Noise flagsprotected PairCounting
paircount
Pair counting measuresprotected PairSetsIndex
psi
Pair Sets Index Measuresprotected boolean
selfPairing
Self pairingprotected int
size1
Number of clusters.protected int
size2
Number of clusters.protected SetMatchingPurity
smp
Set 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 MeanVariance
adjustedSymmetricGini()
Compute the adjusted average Gini for each cluster (in both clusterings - symmetric).MeanVariance
averageSymmetricGini()
Compute the average Gini for each cluster (in both clusterings - symmetric).BCubed
getBCubed()
The BCubed based measuresEditDistance
getEdit()
Get (compute) the edit-distance based measuresEntropy
getEntropy()
Get (compute) the entropy based measuresMaximumMatchingAccuracy
getMaximumMatchingAccuracy()
The Maximum Matching AccuracyPairCounting
getPaircount()
Get (compute) the pair counting measures.PairSetsIndex
getPairSetsIndex()
The Pair Sets Index measuresSetMatchingPurity
getSetMatchingPurity()
The set-matching purity measuresboolean
isStrictPartitioning()
Check whether the marginal cluster sizes both sum to the total size.java.lang.String
toString()
-
-
-
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:
true
when the clustering is a non-overlapping complete partitioning of the data set
-
toString
public java.lang.String toString()
- Overrides:
toString
in 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
-
-