Learn R Programming

arules (version 0.2-1)

measures: Calculating additional Interest Measures for existing Associations

Description

Provides the generic functions and the needed S4 methods to calculate some additional interest measures for a set of existing associations.

Usage

all_confidence(x, ...)
## S3 method for class 'itemsets':
all_confidence(x, transactions = NULL, itemSupport = NULL)
hyperlift(x, ...)
## S3 method for class 'rules':
hyperlift(x, transactions, d = 0.99)
hyperconfidence(x, ...)
## S3 method for class 'rules':
hyperlift(x, transactions = NULL,  complements = TRUE, significance = FALSE)

Arguments

x
the set of associations.
...
further arguments are passed on.
transactions
the transaction data set used to mine the associations.
itemSupport
alternatively to transactions, for some measures a item support in the transaction data set is sufficient.
d
the quantile used to calculate hyperlift.
complements
calculate convidence/significance levels for substitutes instead of complements.
significance
report significance levels instead of confidence levels.

Value

  • A vector containing the values of the interest measure for each association in the set of associations x.

Details

Currently the following interest measures are implemented: [object Object],[object Object],[object Object]

References

Edward R. Omiecinski. Alternative interest measures for mining associations in databases. IEEE Transactions on Knowledge and Data Engineering, 15(1):57-69, Jan/Feb 2003. Michael Hahsler, Kurt Hornik, and Thomas Reutterer. Implications of probabilistic data modeling for rule mining. Report 14, Research Report Series, Department of Statistics and Mathematics, Wirschaftsuniversit�t Wien, Augasse 2-6, 1090 Wien, Austria, March 2005.

See Also

itemsets-class, rules-class

Examples

Run this code
data("Income_transactions")

### calculate all-confidence
itemsets <- apriori(Income_transactions, parameter = list(target = "freq")) 
quality(itemsets) <- cbind(quality(itemsets), 
	all_confonfidence = all_confidence(itemsets))
summary(itemsets)

### calculate hyperlift for the 0.9 quantile
rules <- apriori(Income_transactions)
quality(rules) <- cbind(quality(rules), 
	hyperlift = hyperlift(rules, Income_transactions, d = 0.9))
inspect(SORT(rules, by = "hyperlift")[1:5])

### calculate hyperconfidence and discard all rules with
### a confidence level < 1\%
quality(rules) <- cbind(quality(rules),
 	hyperconfidence = hyperconfidence(rules, Income_transactions))

rules.conf <- rules[quality(rules)$hyperconfidence >= 0.99]
inspect(rules.conf[1:10])

Run the code above in your browser using DataLab