Learn R Programming

arules (version 1.4-2)

is.redundant: Find Redundant Rules

Description

Provides the generic functions and the S4 method is.redundant to find redundant rules.

Usage

is.redundant(x, ...) "is.redundant"(x, measure = "confidence")

Arguments

x
a set of rules.
measure
measure used to check for redundancy.
...
additional arguments.

Value

returns a logical vector indicating which rules are redundant.

Details

A rule is redundant if a more general rules with a higher confidence exists. That is, a more specific rule is redundant if it is less predictive than a more general rule. A rule is more general if it has the same RHS but one or more items removed from the LHS. Formally, a rule is redundent if there

$ exists X' subset X conf(X' -> Y) > conf(X -> Y).$

This is equivalent to a negative improvement as defined by Bayardo et al. (2000). In this implementation other measures than confidence, e.g. improvement of lift, can be used as well.

References

Bayardo, R. , R. Agrawal, and D. Gunopulos (2000). Constraint-based rule mining in large, dense databases. Data Mining and Knowledge Discovery, 4(2/3):217--240.

See Also

interestMeasure

Examples

Run this code
data("Income")
rules <- apriori(Income, parameter = list(support = 0.5))
is.redundant(rules)

## add Bayado's improvement for comparison
quality(rules)$improvement <- interestMeasure(rules, measure = "improvement")

## redundant rules
inspect(rules[is.redundant(rules)])

## non-redundant rules
inspect(rules[!is.redundant(rules)])

Run the code above in your browser using DataLab