Learn R Programming

arules (version 0.2-6)

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

allConfidence(x, ...)
## S3 method for class 'itemsets':
allConfidence(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': hyperConfidence(x, transactions = NULL, complements = TRUE, significance = FALSE)

Arguments

x
the set of associations.
...
further arguments.
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 numeric 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")

### calculate all-confidence
itemsets <- apriori(Income, parameter = list(target = "freq")) 
quality(itemsets) <- cbind(quality(itemsets), 
	allConfonfidence = allConfidence(itemsets))

summary(itemsets)

### calculate hyperlift for the 0.9 quantile
rules <- apriori(Income)
quality(rules) <- cbind(quality(rules), 
	hyperLift = hyperLift(rules, Income, d = 0.9))

inspect(SORT(rules, by = "hyperLift")[1:5])

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

rulesHConf <- rules[quality(rules)$hyperConfidence >= 0.99]

inspect(rulesHConf[1:10])

Run the code above in your browser using DataLab