Class AssociationRule

java.lang.Object
com.imsl.datamining.AssociationRule
All Implemented Interfaces:
Serializable, Cloneable

public class AssociationRule extends Object implements Serializable, Cloneable
Contains association rules discovered by the Apriori algorithm.

An association rule has the form, \(X \implies Y\), where X and Y are two disjoint sets of items (or products) that are represented in a set of occurrences (transactions). The AssociationRule object contains members:

X: \(\{X_1,\ldots,X_{n_X}\}\)
Y: \(\{Y_1,\ldots,Y_{n_Y}\}\)
Support of \( Z=X \cap Y \)
Support of X
Support of Y
Confidence measure for \(X \implies Y\)
Lift measure for \(X \implies Y\)
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    The confidence measure of the association rule.
    double
    The lift measure of the association rule.
    int[]
    Support for the Z, X, and Y components of the association rule.
    int[]
    The X components of the association rule.
    int[]
    The Y components of the association rule.
    void
    Print the member data in this object.
    static void
    Print out the association rules in ar.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getX

      public int[] getX()
      The X components of the association rule.
      Returns:
      an int array containing the X components of the association rule.
    • getY

      public int[] getY()
      The Y components of the association rule.
      Returns:
      an int array containing the Y components of the association rule.
    • getSupport

      public int[] getSupport()
      Support for the Z, X, and Y components of the association rule.
      Returns:
      an int array containing the Z, X, and Y components of the association rule.
    • getConfidence

      public double getConfidence()
      The confidence measure of the association rule.
      Returns:
      a double specifying the confidence measure of the association rule.
    • getLift

      public double getLift()
      The lift measure of the association rule.
      Returns:
      a double specifying the lift measure of the association rule.
    • print

      public void print()
      Print the member data in this object.

      The following is an example of this format:

      X = {0} \(\implies\) Y = {2}
        supp(X)=27, supp(Y)=33, supp(X and Y)=22
        conf= 0.81, lift=1.23

    • print

      public static void print(AssociationRule[] ar)
      Print out the association rules in ar.
      Parameters:
      ar - an AssociationRule array containing the association rules generated from a set of itemsets.