Class GiniIndex

  • All Implemented Interfaces:
    InterestingnessMeasure

    @Reference(authors="P. Tan, V. Kumar",title="Interestingness measures for association patterns: A perspective",booktitle="Proc. Workshop on Postprocessing in Machine Learning and Data Mining",url="https://www.cs.umn.edu/sites/cs.umn.edu/files/tech_reports/00-036.pdf",bibkey="tr/umn/TanK00") @Reference(authors="L. Breiman, J. H. Friedman, R. A. Olshen, C. J. Stone",title="Classification and Regression Trees",booktitle="",bibkey="books/wa/BreimanFOS84")
    public class GiniIndex
    extends java.lang.Object
    implements InterestingnessMeasure
    Gini-index based interestingness measure, using the weighted squared conditional probabilities compared to the non-conditional priors.

    \[ P(X)\left(P(Y|X)^2+P(\neg Y|X)^2\right) + P(\neg X)\left(P(Y|\neg X)^2+P(\neg Y|\neg X)^2\right) - P(Y)^2 - P(\neg Y)^2 \]

    Reference:

    P. Tan, V. Kumar
    Interestingness measures for association patterns: A perspective
    In Proc. Workshop on Postprocessing in Machine Learning and Data Mining

    The Gini was originally used in decision trees:

    L. Breiman, J. H. Friedman, R. A. Olshen, C. J. Stone
    Classification and Regression Trees

    Since:
    0.7.5
    Author:
    Frederic Sautter
    • Constructor Summary

      Constructors 
      Constructor Description
      GiniIndex()
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double measure​(int t, int sX, int sY, int sXY)
      Computes the value of the measure for a given support values
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GiniIndex

        public GiniIndex()
        Constructor.
    • Method Detail

      • measure

        public double measure​(int t,
                              int sX,
                              int sY,
                              int sXY)
        Description copied from interface: InterestingnessMeasure
        Computes the value of the measure for a given support values
        Specified by:
        measure in interface InterestingnessMeasure
        Parameters:
        t - Total number of transaction
        sX - Support of the antecedent
        sY - Support of the consequent
        sXY - Support of the union of antecedent and consequent
        Returns:
        value of the measure