https://github.com/mhahsler/arulesnbminer
Mining NB-Frequent Itemsets and NB-Precise Rules - R Package
https://github.com/mhahsler/arulesnbminer
association-rules
Last synced: about 1 month ago
JSON representation
Mining NB-Frequent Itemsets and NB-Precise Rules - R Package
- Host: GitHub
- URL: https://github.com/mhahsler/arulesnbminer
- Owner: mhahsler
- Created: 2015-10-12T03:36:58.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2025-08-08T17:30:09.000Z (3 months ago)
- Last Synced: 2025-08-08T19:29:46.177Z (3 months ago)
- Topics: association-rules
- Language: Java
- Homepage:
- Size: 773 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
Awesome Lists containing this project
README
---
output: github_document
---
```{r echo=FALSE, results = 'asis'}
pkg <- 'arulesNBMiner'
source("https://raw.githubusercontent.com/mhahsler/pkg_helpers/main/pkg_helpers.R")
pkg_title(pkg)
```
This R package
extends package [arules](https://github.com/mhahsler/arules) with
NBMiner, an implementation of the model-based mining algorithm
for mining NB-frequent itemsets presented in "Michael Hahsler. [A
model-based frequency constraint for mining associations from
transaction data.](https://dx.doi.org/10.1007/s10618-005-0026-2)
_Data Mining and Knowledge Discovery,_ 13(2):137-166, September 2006."
In addition an extension for NB-precise rules is implemented.
```{r echo=FALSE, results = 'asis'}
pkg_install(pkg)
```
## Usage
Estimate NBD model parameters for the Agrawal data set.
```{r}
library("arulesNBMiner")
data("Agrawal")
param <- NBMinerParameters(Agrawal.db, pi = 0.99, theta = 0.5,
maxlen = 5, minlen = 1, trim = 0,
verbose = TRUE, plot = TRUE)
```
Mine NB-frequent itemsets
```{r}
itemsets_NB <- NBMiner(Agrawal.db, parameter = param,
control = list(verb = TRUE, debug = FALSE))
```
Inspect some itemsets with the highest precision.
```{r}
inspect(head(itemsets_NB, by = "precision"))
```
## References
* Michael Hahsler, [A
model-based frequency constraint for mining associations from
transaction data.](https://dx.doi.org/10.1007/s10618-005-0026-2)
_Data Mining and Knowledge Discovery,_ 13(2):137-166,
September 2006.
[Free preprint](https://doi.org/10.48550/arXiv.0803.3224)
* 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.