Learn R Programming

arules (version 0.1-3)

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)

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.

Value

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

Details

Currently the interest measures all-confidence and hyperlift are implemented. All-confidence is defined on itemsets as the minimum confidence of all possible rule generated from the itemset.

Hyperlift is an adaptation of the lift measure which is more robust for low counts.

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

Run the code above in your browser using DataLab