Skip to content
RDocumentation: is.redundant
Note that this notebook was automatically generated from an RDocumentation page. It depends on the package and the example code whether this code will run without errors. You may need to edit the code to make things work.
if(!require('arules')) {
install.packages('arules')
library('arules')
}
data("Income")
## mine some rules with the consequent "language in home=english"
rules <- apriori(Income, parameter = list(support = 0.5),
appearance = list(rhs = "language in home=english", default = "lhs"))
## for better comparison we sort the rules by confidence and add Bayado's improvement
rules <- sort(rules, by = "confidence")
quality(rules)$improvement <- interestMeasure(rules, measure = "improvement")
inspect(rules)
is.redundant(rules)
## redundant rules
inspect(rules[is.redundant(rules)])
## non-redundant rules
inspect(rules[!is.redundant(rules)])