filterRules: Post process association rules

Description Usage Arguments Value Examples

Description

This function filters rules that have already been mined.

Usage

1
filterRules(rules, oneSideOnly = oneSideOnly)

Arguments

rules

list of association rules (S4 arules object). Output of apriori function.

oneSideOnly

list of character vectors. Each character vector of the list contains variables that are likely very similar and will generate uninteresting rules. So the filtering algorithm will prune rules where variables within this list appear on both the RHS & LHS

Value

association rules

Examples

1
2
3
4
5
6
7
library('arules')
data('Adult')
rules <- apriori(Adult, parameter = list(supp=0.01, conf=0.9, target = "rules"))
oneSideOnly <- list(c('age', 'workclass', 'education'), c('marital-status', 'occupation', 'race'))
f2 <- filterRules(rules, oneSideOnly=oneSideOnly)
length(rules)
length(f2)

brooksandrew/Rsenal documentation built on May 13, 2019, 7:50 a.m.