R: Find Redundant Rules

is.redundant {arules} | R Documentation

## Find Redundant Rules

### Description

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

### Usage

    is.redundant(x, ...)
    ## S4 method for signature 'rules'
    is.redundant(x, measure = "confidence")

### Arguments

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

### Details

A rule is redundant if a more general rules with the same or a higher confidence exists. That is, a more specific rule is redundant if it is only equally or even 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 X -> Y is redundant if

for some X' subset X, conf(X' -> Y) >= conf(X -> Y).

This is equivalent to a negative or zero 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.

### Value

returns a logical vector indicating which rules are redundant.

### Author(s)

Michael Hahsler and Christian Buchta

### 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

    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)])

[Package arules version 1.6-2 Index]