Class 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 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
      • bcubed

        protected BCubed bcubed
        BCubed measures
    • Constructor Detail

      • ClusterContingencyTable

        public ClusterContingencyTable​(boolean selfPairing,
                                       boolean breakNoiseClusters,
                                       Clustering<?> result1,
                                       Clustering<?> result2)
        Constructor.
        Parameters:
        selfPairing - Build self-pairs
        breakNoiseClusters - Break noise clusters into individual objects
        result1 - First clustering
        result2 - 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 class java.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