Learn R Programming

arules (version 0.2-6)

ruleInduction: Rule Induction for a Set of Itemsets

Description

Provides the generic function and the needed S4 method to induce all rules which can be generated by the given itemsets from a transactions data set.

Usage

ruleInduction(x, ...)
## S3 method for class 'itemsets':
ruleInduction(x, transactions, confidence = 0.8, verbose = FALSE)

Arguments

x
the set of itemsets from which rules will be induced.
...
further arguments.
transactions
the transaction data set used to mine the itemsets.
confidence
"numeric"; minimum confidence for the rules.
verbose
"logical"; report progress.

Value

  • An object of class rules.

Details

Currently, only a very simple rule induction method is implemented. All rules are mined from the transactions data set using the minimal support found in itemsets. And in a second step all rules which do not stem from one of the itemsets are removed. This procedure will be in many cases very slow (e.g., for itemsets with many elements or very low support).

See Also

itemsets-class, rules-class transactions-class

Examples

Run this code
data("Adult")

### find all closed frequent itemsets
closed <- apriori(Adult, 
	parameter = list(target = "closed", support = 0.4))

### rule induction
rules <- ruleInduction(closed, Adult, verbose = TRUE)

### inspect the resulting rules
inspect(SORT(rules, by = "lift")[1:5])

Run the code above in your browser using DataLab