Learn R Programming

arules (version 0.2-6)

apriori: Mining Associations with Apriori

Description

Mine frequent itemsets, association rules or association hyperedges using the Apriori algorithm. The Apriori algorithm employs level-wise search for frequent itemsets. The implementation of Apriori used includes some improvements (e.g., a prefix tree and item sorting).

Usage

apriori(data, parameter = NULL, appearance = NULL, control = NULL)

Arguments

data
object of class transactions or any data structure which can be coerced into transactions
parameter
object of class APparameter or named list. The default behavior is to mine rules with support 0.1, confidence 0.8, and maxlen 5.
appearance
object of class APappearance or named list. With this argument item appearance can be restricted. By default all items can appear unrestricted.
control
object of class APcontrol or named list. Controls the performance of the mining algorithm (item sorting, etc.)

Value

Details

Calls the C implementation of the Apriori algorithm by Christian Borgelt for mining frequent itemsets, rules or hyperedges.

References

R. Agrawal, T. Imielinski, and A. Swami. Mining association rules between sets of items in large databases. In Proceedings of the ACM SIGMOD International Conference on Management of Data, pages 207-216, Washington D.C., May 1993. Christian Borgelt and Rudolf Kruse. Induction of Association Rules: Apriori Implementation. 15th Conference on Computational Statistics (COMPSTAT 2002, Berlin, Germany) Physica Verlag, Heidelberg, Germany 2002

Christian Borgelt. Efficient Implementations of Apriori and Eclat. Workshop of Frequent Item Set Mining Implementations (FIMI 2003, Melbourne, FL, USA).

See Also

APparameter-class, APcontrol-class, APappearance-class, transactions-class, itemsets-class, rules-class

Examples

Run this code
data("Adult")
## Mine association rules.
rules <- apriori(Adult, 
                 parameter = list(supp = 0.5, conf = 0.9,
                                  target = "rules"))
summary(rules)

Run the code above in your browser using DataLab