java.lang.Object
com.pervasive.datarush.analytics.arm.AssociationRule
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionAssociationRule(int[] antecedent, int[] consequent, double support, double confidence, double lift) Construct a new association rule. -
Method Summary
-
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 setconsequent- the consequent item setsupport- the support for the ruleconfidence- the confidence of the rulelift- the lift of the rule
-
-
Method Details
-
toString
-
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
-