Class AssociationRule

java.lang.Object
com.pervasive.datarush.analytics.arm.AssociationRule
All Implemented Interfaces:
Serializable

public class AssociationRule extends Object implements Serializable
An association rule defining the strength of a relationship between two item sets. The rule contains an antecedent (A) item set and a consequent (C) item set.

The support of a rule is defined as: support(A->C) = support(A+C).

The confidence of a rule is defined as: confidence(A->C) = support(A+C) / support(A).

The lift of a rule is defined as: lift(A->C) = confidence(A->C) / support(C).

See Also:
  • Constructor Details

    • AssociationRule

      public AssociationRule(int[] antecedent, int[] consequent, double support, double confidence, double lift)
      Construct a new association rule.
      Parameters:
      antecedent - the antecedent item set
      consequent - the consequent item set
      support - the support for the rule
      confidence - the confidence of the rule
      lift - the lift of the rule
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getAntecedent

      public int[] getAntecedent()
      Return the antecedent item set of the rule.
      Returns:
      antecedent item set
    • getConsequent

      public int[] getConsequent()
      Return the consequent item set of the rule.
      Returns:
      consequent item set
    • getConfidence

      public double getConfidence()
      Return the confidence of the rule.
      Returns:
      confidence of the rule
    • getSupport

      public double getSupport()
      Return the support of the rule.
      Returns:
      support of the rule
    • getLift

      public double getLift()
      Return the lift of the rule.
      Returns:
      lift of the rule