R package arules - Mining Association Rules and Frequent Itemsets
Introduction
The arules package family for R provides the infrastructure for
representing, manipulating and analyzing transaction data and patterns
using frequent itemsets and association
rules. The
package also provides a wide range of interest
measures and mining
algorithms including the code of Christian Borgelt’s popular and
efficient C implementations of the association mining algorithms
Apriori and
Eclat. In addition, the following
mining algorithms are available via
fim4r:
Hahsler M, Gruen B, Hornik K (2005). “arules - A Computational
Environment for Mining Association Rules and Frequent Item Sets.”
Journal of Statistical Software, 14(15), 1-25. ISSN 1548-7660,
doi:10.18637/jss.v014.i15https://doi.org/10.18637/jss.v014.i15.
@Article{,
title = {arules -- {A} Computational Environment for Mining Association Rules and Frequent Item Sets},
author = {Michael Hahsler and Bettina Gruen and Kurt Hornik},
year = {2005},
journal = {Journal of Statistical Software},
volume = {14},
number = {15},
pages = {1--25},
doi = {10.18637/jss.v014.i15},
month = {October},
issn = {1548-7660},
}
Packages
arules core packages
arules: arules base
package with data structures, mining algorithms (APRIORI and ECLAT),
interest measures.
inTrees: Interpret Tree
Ensembles provides functions for: extracting, measuring and pruning
rules; selecting a compact rule set; summarizing rules into a learner.
Introduction
The arules package family for R provides the infrastructure for representing, manipulating and analyzing transaction data and patterns using frequent itemsets and association rules. The package also provides a wide range of interest measures and mining algorithms including the code of Christian Borgelt’s popular and efficient C implementations of the association mining algorithms Apriori and Eclat. In addition, the following mining algorithms are available via fim4r:
Code examples can be found in Chapter 5 of the web book R Companion for Introduction to Data Mining.
To cite package ‘arules’ in publications use:
Packages
arules core packages
Other related packages
Additional mining algorithms
fim4r()is provided inarules.opus()withformat = 'itemsets'.In-database analytics
Interface
Classification
Outlier Detection
Recommendation/Prediction
The following R packages use
arules: arc, arlclustering, arulesCBA, arulesNBMiner, arulesSequences, arulesViz, clickstream, CLONETv2, CRE, ctsem, discnorm, fcaR, fdm2id, GroupBN, ibmdbR, inTrees, nuggets, opusminer, pervasive, pmml, qCBA, RareComb, rattle, rCBA, recommenderlab, rgnoisefilt, RKEEL, RulesTools, sbrl, SurvivalTests, TELPInstallation
Stable CRAN version: Install from within R with
Current development version: Install from r-universe.
Usage
Load package and mine some association rules.
Inspect the rules with the highest lift.
Using arules with tidyverse
arulesworks seamlessly with tidyverse. For example:dplyrcan be used for cleaning and preparing the transactions.transaction()and other functions accepttibbleas input.|>.ggplot2.For example, we can remove the ethnic information column before creating transactions and then mine and inspect rules.
Using arules from Python
arulesandarulesVizcan now be used directly from Python with the Python packagearulespyavailable form PyPI.Support
Please report bugs here on GitHub. Questions should be posted on stackoverflow and tagged with arules.
References