- 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AssociationRule(int[] antecedent, int[] consequent, double support, double confidence, double lift)
Construct a new association rule.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]
getAntecedent()
Return the antecedent item set of the rule.double
getConfidence()
Return the confidence of the rule.int[]
getConsequent()
Return the consequent item set of the rule.double
getLift()
Return the lift of the rule.double
getSupport()
Return the support of the rule.String
toString()
-
-
-
Constructor Detail
-
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 Detail
-
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
-
-