
Last chance! 50% off unlimited learning
Sale ends in
rules
class represents a set of rules.Note that the class can also represent a multiset of rules with duplicated
elements. Duplicated elements can be removed with unique
.
apriori
.
Objects can also be created by calls of the form
new("rules", ...)
.associations
, directly.[-methods
,
apriori
,
c
,
duplicated
,
inspect
,
length
,
match
,
sets
,
size
,
subset
,
associations-class
,
itemMatrix-class
,data("Adult")
## Mine rules.
rules <- apriori(Adult, parameter = list(support = 0.4))
## Select a subset of rules using partial matching on the items
## in the right-hand-side and a quality measure
rules.sub <- subset(rules, subset = rhs %pin% "sex" & lift > 1.3)
## Display rules.
inspect(sort(rules.sub)[1:3])
Run the code above in your browser using DataLab