-
Notifications
You must be signed in to change notification settings - Fork 15
/
README.Rmd
74 lines (54 loc) · 2.82 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
output: github_document
---
```{r echo=FALSE, results = 'asis'}
pkg <- "arulesViz"
source("https://raw.githubusercontent.com/mhahsler/pkg_helpers/main/pkg_helpers.R")
pkg_title(pkg)
```
## Introduction
This R package
extends package [arules](https://github.com/mhahsler/arules) with various visualization techniques for association rules and itemsets. The package also includes several interactive visualizations for rule exploration.
```{r echo=FALSE, results = 'asis'}
pkg_usage(pkg)
pkg_citation(pkg, 2)
```
This might also require the development version of [arules](https://github.com/mhahsler/arules).
## Features
* Visualizations using engines `ggplot2` (default engine for most methods), `grid`, `base` (R base plots), `htmlwidget` (powered by `plotly` and `visNetwork`).
* Interactive visualizations using `grid`, `plotly` and `visNetwork`.
* Interactive rule inspection with `datatable`.
* Integrated interactive rule exploration using `ruleExplorer`.
Available Visualizations
* Scatterplot, two-key plot
* Matrix and matrix 3D visualization
* Grouped matrix-based visualization
* Several graph-based visualizations
* Doubledecker and mosaic plots
* Parallel Coordinate plot
```{r echo=FALSE, results = 'asis'}
pkg_install(pkg)
```
## Usage
Mine some rules.
```{r }
library("arulesViz")
data("Groceries")
rules <- apriori(Groceries, parameter = list(support = 0.005, confidence = 0.5))
```
### Standard visualizations
```{r scatterplot}
plot(rules)
```
```{r graph}
plot(rules, method = "graph", limit = 20)
```
### Interactive visualization
Live examples for interactive visualizations can be seen in [Chapter 5 of An R Companion for Introduction to Data Mining](https://mhahsler.github.io/Introduction_to_Data_Mining_R_Examples/book/association-analysis-basic-concepts-and-algorithms.html#interactive-visualizations)
## References
* Michael Hahsler. [arulesViz: Interactive visualization of association rules with R.](https://journal.r-project.org/archive/2017/RJ-2017-047/RJ-2017-047.pdf) _R Journal,_ 9(2):163-175, December 2017.
* Michael Hahsler. [An R Companion for Introduction to Data Mining: Chapter 5](https://mhahsler.github.io/Introduction_to_Data_Mining_R_Examples/book/association-analysis-basic-concepts-and-algorithms.html).
Online Book. https://mhahsler.github.io/Introduction_to_Data_Mining_R_Examples/book/, 2021.
* Michael Hahsler, Sudheer Chelluboina, Kurt Hornik, and Christian Buchta. [The arules R-package ecosystem: Analyzing interesting patterns from large transaction datasets.](https://jmlr.csail.mit.edu/papers/v12/hahsler11a.html) _Journal of Machine Learning Research,_ 12:1977-1981, 2011.
* Michael Hahsler and Sudheer Chelluboina. [Visualizing Association Rules: Introduction
to the R-extension Package arulesViz](https://cran.r-project.org/package=arulesViz/vignettes/arulesViz.pdf) (with complete examples).