Infrastructure for representing transaction data, mining frequent itemsets and association rules, and evaluating the resulting patterns. The package includes efficient C implementations of the Apriori and Eclat algorithms.
Source:R/AAA_arules-package.R
arules-package.RdProvides the infrastructure for representing, manipulating and analyzing transaction data and patterns (frequent itemsets and association rules). Also provides C implementations of the association mining algorithms Apriori and Eclat. Hahsler, Gruen and Hornik (2005) doi:10.18637/jss.v014.i15 .
Typical workflow
Create a transactions object with
transactions()or import basket or single-format data withread.transactions(). Numeric variables should first be converted to categories withdiscretize()ordiscretizeDF().Inspect the data with
summary(),inspect(),itemFrequency(), oritemFrequencyPlot().Mine association rules with
apriori()or frequent itemsets witheclat().Rank and filter patterns with
sort(),subset(), andinterestMeasure(). Useis.redundant(),is.closed(), oris.maximal()for common postprocessing tasks.Convert results with
DATAFRAME()orLIST(), or visualize them with the suggested package arulesViz.
Choosing a mining function
apriori()mines rules or itemsets and offers detailed control over rule appearance.eclat()is designed for mining frequent, closed, or maximal itemsets.ruleInduction()creates rules from an existing collection of itemsets.fim4r()provides access to additional mining algorithms when the optional fim4r package is installed.
Core classes
transactions stores sparse binary transaction data. Mining functions return itemsets or rules, both derived from associations. Item coding must be compatible when objects are compared or combined; see itemCoding.
See also
arulesViz for visualization and the package vignettes for extended examples.
Author
Maintainer: Michael Hahsler mhahsler@lyle.smu.edu (ORCID) [copyright holder]
Authors:
Michael Hahsler mhahsler@lyle.smu.edu (ORCID) [copyright holder]
Christian Buchta [copyright holder]
Bettina Gruen [copyright holder]
Kurt Hornik (ORCID) [copyright holder]
Other contributors:
Christian Borgelt [contributor, copyright holder]
Ian Johnson [contributor]
Makhlouf Ledmi [contributor]