public class ARM extends java.lang.Object implements java.lang.Iterable<AssociationRule>
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 an 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. Association rules are usually required to
satisfy a user-specified minimum support and a user-specified
minimum confidence at the same time.Modifier and Type | Method and Description |
---|---|
static java.util.stream.Stream<AssociationRule> |
apply(double confidence,
FPTree tree)
Mines the association rules.
|
java.util.Iterator<AssociationRule> |
iterator() |
public java.util.Iterator<AssociationRule> iterator()
iterator
in interface java.lang.Iterable<AssociationRule>
public static java.util.stream.Stream<AssociationRule> apply(double confidence, FPTree tree)
confidence
- the confidence threshold for association rules.