smile.association
Class AssociationRule
- java.lang.Object
-
- smile.association.AssociationRule
-
public class AssociationRule extends java.lang.ObjectAssociation rule object. Let I = {i1, i2,..., in} be a set of n binary attributes called items. Let D = {t1, t2,..., tm} be a set of transactions called the database. Each transaction in D has a unique transaction ID and contains a subset of the items in I. An association rule is defined as an implication of the form X ⇒ Y where X, Y ⊆ I and X ∩ Y = Ø. The item sets X and Y are called antecedent (left-hand-side or LHS) and consequent (right-hand-side or RHS) of the rule, respectively. The support supp(X) of an item set X is defined as the proportion of transactions in the database which contain the item set. Note that the support of an association rule X ⇒ Y is supp(X ∪ Y). The confidence of a rule is defined conf(X ⇒ Y) = supp(X ∪ Y) / supp(X). Confidence can be interpreted as an estimate of the probability P(Y | X), the probability of finding the RHS of the rule in transactions under the condition that these transactions also contain the LHS.
-
-
Field Summary
Fields Modifier and Type Field and Description int[]antecedentAntecedent itemset.doubleconfidenceThe confidence value.int[]consequentConsequent itemset.doublesupportThe support value.
-
Constructor Summary
Constructors Constructor and Description AssociationRule(int[] antecedent, int[] consequent, double support, double confidence)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object o)inthashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
antecedent
public final int[] antecedent
Antecedent itemset.
-
consequent
public final int[] consequent
Consequent itemset.
-
support
public final double support
The support value. The support supp(X) of an itemset X is defined as the proportion of transactions in the database which contain the itemset.
-
confidence
public final double confidence
The confidence value. The confidence of a rule is defined conf(X ⇒ Y) = supp(X ∪ Y) / supp(X). Confidence can be interpreted as an estimate of the probability P(Y | X), the probability of finding the RHS of the rule in transactions under the condition that these transactions also contain the LHS.
-
-
Constructor Detail
-
AssociationRule
public AssociationRule(int[] antecedent, int[] consequent, double support, double confidence)Constructor.- Parameters:
antecedent- the antecedent itemset (LHS) of the association rule.consequent- the consequent itemset (RHS) of the association rule.support- the associated support value.confidence- the associated confidence value.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG