All Projects → mhahsler → Arules

mhahsler / Arules

Licence: gpl-3.0
Mining Association Rules and Frequent Itemsets with R

Programming Languages

c
50402 projects - #5 most used programming language
r
7636 projects

Labels

Projects that are alternatives of or similar to Arules

Rintrojs
Wrapper for the Intro.js library
Stars: ✭ 96 (-30.94%)
Mutual labels:  cran
Qqman
An R package for creating Q-Q and manhattan plots from GWAS results
Stars: ✭ 115 (-17.27%)
Mutual labels:  cran
Rblpapi
R package interfacing the Bloomberg API from https://www.bloomberglabs.com/api/
Stars: ✭ 133 (-4.32%)
Mutual labels:  cran
Startup
🔧 R package: startup - Friendly R Startup Configuration
Stars: ✭ 107 (-23.02%)
Mutual labels:  cran
Mlr
Machine Learning in R
Stars: ✭ 1,542 (+1009.35%)
Mutual labels:  cran
Dharma
Diagnostics for HierArchical Regession Models
Stars: ✭ 124 (-10.79%)
Mutual labels:  cran
Colourlovers
🎨 📦 R Client for the COLOURlovers API
Stars: ✭ 92 (-33.81%)
Mutual labels:  cran
Scatterd3
R scatter plot htmlwidget based on D3.js
Stars: ✭ 135 (-2.88%)
Mutual labels:  cran
Imputets
CRAN R Package: Time Series Missing Value Imputation
Stars: ✭ 114 (-17.99%)
Mutual labels:  cran
R Appveyor
Tools for using R with AppVeyor (https://appveyor.com)
Stars: ✭ 133 (-4.32%)
Mutual labels:  cran
Manipulatewidget
Add More Interactivity to htmlwidgets
Stars: ✭ 110 (-20.86%)
Mutual labels:  cran
Rinside
Seamless embedding of R in C++ programs
Stars: ✭ 112 (-19.42%)
Mutual labels:  cran
Batchtools
Tools for computation on batch systems
Stars: ✭ 127 (-8.63%)
Mutual labels:  cran
Shiny.i18n
Shiny applications internationalisation made easy
Stars: ✭ 104 (-25.18%)
Mutual labels:  cran
Pinp
Pinp Is Not PNAS -- Two-Column PDF Template
Stars: ✭ 134 (-3.6%)
Mutual labels:  cran
Mschart
📊 mschart: office charts from R
Stars: ✭ 94 (-32.37%)
Mutual labels:  cran
Minicran
R package to create internally consistent, mini version of CRAN
Stars: ✭ 123 (-11.51%)
Mutual labels:  cran
Anytime
Anything to POSIXct or Date Converter
Stars: ✭ 137 (-1.44%)
Mutual labels:  cran
D3r
d3.js helpers for R
Stars: ✭ 133 (-4.32%)
Mutual labels:  cran
Drat
Drat R Archive Template
Stars: ✭ 127 (-8.63%)
Mutual labels:  cran

arules --- Mining Association Rules and Frequent Itemsets with R

CRAN version Rdoc CRAN RStudio mirror downloads R build status

The arules package for R provides the infrastructure for representing, manipulating and analyzing transaction data and patterns using frequent itemsets and association rules. Also provides a wide range of interest measures and mining algorithms including a interfaces and the code of Borgelt's efficient C implementations of the association mining algorithms Apriori and Eclat.

arules core packages:

  • arules: arules base package with data structures, mining algorithms (APRIORI and ECLAT), interest measures.
  • arulesViz: Visualization of association rules.
  • arulesCBA: Classification algorithms based on association rules (includes CBA).
  • arulesSequences: Mining frequent sequences (cSPADE).

Other related packages:

Additional mining algorithms

  • arulesNBMiner: Mining NB-frequent itemsets and NB-precise rules.
  • opusminer: OPUS Miner algorithm for filtered top-k association discovery.
  • RKEEL: Interface to KEEL's association rule mining algorithm.
  • RSarules: Mining algorithm which randomly samples association rules with one pre-chosen item as the consequent from a transaction dataset.

In-database analytics

  • ibmdbR: IBM in-database analytics for R can calculate association rules from a database table.
  • rfml: Mine frequent itemsets or association rules using a MarkLogic server.

Interface

  • rattle: Provides a graphical user interface for association rule mining.
  • pmml: Generates PMML (predictive model markup language) for association rules.

Classification

  • arc: Alternative CBA implementation.
  • inTrees: Interpret Tree Ensembles provides functions for: extracting, measuring and pruning rules; selecting a compact rule set; summarizing rules into a learner.
  • rCBA: Alternative CBA implementation.
  • qCBA: Quantitative Classification by Association Rules.
  • sblr: Scalable Bayesian rule lists algorithm for classification.

Outlier Detection

Recommendation/Prediction

  • recommenerlab: Supports creating predictions using association rules.

Installation

Stable CRAN version: install from within R with

install.packages("arules")

Current development version: install from GitHub (needs devtools and [Rtools for Windows] (https://cran.r-project.org/bin/windows/Rtools/)).

devtools::install_github("mhahsler/arules")

Usage

Load package and mine some association rules.

library("arules")
data("Adult")

rules <- apriori(Adult, parameter = list(supp = 0.5, conf = 0.9, target = "rules"))
Parameter specification:
 confidence minval smax arem  aval originalSupport support minlen maxlen target   ext
        0.9    0.1    1 none FALSE            TRUE     0.5      1     10  rules FALSE

Algorithmic control:
 filter tree heap memopt load sort verbose
    0.1 TRUE TRUE  FALSE TRUE    2    TRUE

Absolute minimum support count: 24421 

apriori - find association rules with the apriori algorithm
version 4.21 (2004.05.09)        (c) 1996-2004   Christian Borgelt
set item appearances ...[0 item(s)] done [0.00s].
set transactions ...[115 item(s), 48842 transaction(s)] done [0.03s].
sorting and recoding items ... [9 item(s)] done [0.00s].
creating transaction tree ... done [0.03s].
checking subsets of size 1 2 3 4 done [0.00s].
writing ... [52 rule(s)] done [0.00s].
creating S4 object  ... done [0.01s].

Show basic statistics.

summary(rules)
set of 52 rules

rule length distribution (lhs + rhs):sizes
 1  2  3  4 
 2 13 24 13 

   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  1.000   2.000   3.000   2.923   3.250   4.000 

summary of quality measures:
    support         confidence          lift            count      
 Min.   :0.5084   Min.   :0.9031   Min.   :0.9844   Min.   :24832  
 1st Qu.:0.5415   1st Qu.:0.9155   1st Qu.:0.9937   1st Qu.:26447  
 Median :0.5974   Median :0.9229   Median :0.9997   Median :29178  
 Mean   :0.6436   Mean   :0.9308   Mean   :1.0036   Mean   :31433  
 3rd Qu.:0.7426   3rd Qu.:0.9494   3rd Qu.:1.0057   3rd Qu.:36269  
 Max.   :0.9533   Max.   :0.9583   Max.   :1.0586   Max.   :46560  

mining info:
  data ntransactions support confidence
 Adult         48842     0.5        0.9

Inspect rules with the highest lift.

inspect(head(rules, by = "lift"))
    lhs                               rhs                              support confidence     lift
[1] {sex=Male,                                                                                    
     native-country=United-States} => {race=White}                   0.5415421  0.9051090 1.058554
[2] {sex=Male,                                                                                    
     capital-loss=None,                                                                           
     native-country=United-States} => {race=White}                   0.5113632  0.9032585 1.056390
[3] {race=White}                   => {native-country=United-States} 0.7881127  0.9217231 1.027076
[4] {race=White,                                                                                  
     capital-loss=None}            => {native-country=United-States} 0.7490480  0.9205626 1.025783
[5] {race=White,                                                                                  
     sex=Male}                     => {native-country=United-States} 0.5415421  0.9204803 1.025691
[6] {race=White,                                                                                  
     capital-gain=None}            => {native-country=United-States} 0.7194628  0.9202807 1.025469

Usage from Python

See Getting started with R arules using Python.

Support

Please report bugs here on GitHub. Questions should be posted on stackoverflow and tagged with arules.

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].