Description Usage Arguments Value Examples
View source: R/apriorimining.R
Mines association rules using the Apriori Algorithm.
The function demands a transaction matrix, user specified minimum
support and minimum confidence and returns generated association rules.
First apriorimining
transforms the data into an
object of class TransactionData
using create_transactionmatrix
,
then the function passes this object
to freq_items
in order to find frequent item sets. Finally apriorimining
generates association rules from those frequent item sets using rules
.
These functions can also be accessed seperately.
The function apriorimining
returns an object of class
AssociationRules, which can be analysed using show
and summary
.
1 | apriorimining(input, m_sup, m_conf)
|
input |
Binary matrix containing transaction data, with rows representing transactions and columns representing items. Can be either logical or numeric, every value has to be either 0 / 1 or FALSE / TRUE (0 or FALSE if item is not bought). Columns should be named. |
m_sup |
User specified minimum support |
m_conf |
User specified minimum confidence |
Returns an object of class AssociationRules
1 2 3 4 5 6 7 8 9 | ## Not run:
## Load data
data(Groceries)
## Mine rules
x <- apriorimining(Groceries, m_sup = 0.05, m_conf = 0.3)
## use methods
summary(x)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.