
Last chance! 50% off unlimited learning
Sale ends in
rules
class represents a set of rules.Note that the class can also contain
a collection 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.apriori
,
associations-class
,
itemMatrix-class
,data("Adult")
## Mine rules.
rules <- apriori(Adult, parameter = list(support = 0.4))
## Select a subset using an item in the right-hand-side
## and a quality measure
rules.sub <- subset(rules, subset = rhs %in% "sex" & lift > 1.3)
## Display rules.
inspect(SORT(rules.sub)[1:3])
Run the code above in your browser using DataLab