Title: | Recursive Mining for Frequent Pattern and Confident Association Rules |
---|---|
Description: | Provides functions allowing the user to recursively extract frequent patterns and confident rules according to indicators of minimal support and minimal confidence. These functions are described in "Recursive Association Rule Mining" Abdelkader Mokkadem, Mariane Pelletier, Louis Raimbault (2020) <arXiv:2011.14195>. |
Authors: | Louis Raimbault [aut,cre], A.Mokkadem [aut], M.Pelletier [aut] |
Maintainer: | Louis Raimbault <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0 |
Built: | 2024-10-27 03:48:29 UTC |
Source: | https://github.com/cran/RecAssoRules |
This first version makes it possible to carry out the usual applications of association rule Mining.This by using recursive algorithms. All of the functions are using the C++ language. For more usage security, it mainly uses the std and stl libraries, reducing only very slightly the efficiency of the algorithms. It will be updated soon with functions allowing it to be applied on non-fixed databases, as well as a more practical interface.
Returns a list with two objets : freqset a R DataFrame with 3 columns , the set-names , their support and relative support and rulesset a R Dataframe with 3 colums , the antecedant names , the consequent names and their confidence. When lauching the function, the BinaryMatrix is ordered in ascendant colsums order. For each column, the frequent itemSets and confident Rules containing the current tested item are extracted with the ARM traversal function.
prefrecrules (Bitmax , varnames , relativeSup , Minconf )
prefrecrules (Bitmax , varnames , relativeSup , Minconf )
Bitmax |
A binary DataFrame. |
varnames |
A vector of character or a Matrix character. |
relativeSup |
The wanted relative min Support value. |
Minconf |
The wanted min confident value. |
data("Transacfruits") ## Import and build Transafruits as binary matrix. binaryfruits = transactiontoBitmax (as.matrix(Transacfruits),",") outsetrules = prefrecrules (binaryfruits, names(binaryfruits),0.02, 0.4) ## Mine frequents itemsets and confidentes rules with : ## relative min support of 0.02 and min confidence of 0.4.
data("Transacfruits") ## Import and build Transafruits as binary matrix. binaryfruits = transactiontoBitmax (as.matrix(Transacfruits),",") outsetrules = prefrecrules (binaryfruits, names(binaryfruits),0.02, 0.4) ## Mine frequents itemsets and confidentes rules with : ## relative min support of 0.02 and min confidence of 0.4.
Provides a R DataFrame with 3 columns , the set-names , their support and relative support. When lauching the function, The BinaryMatrix is ordered in ascendant colsums order. For each column, the frequent itemSets containing the current tested item are extracted with the traversal function.
prefrecset (Bitmax , varnames , relativeSup )
prefrecset (Bitmax , varnames , relativeSup )
Bitmax |
A binary DataFrame |
varnames |
A vector of character or a Matrix character. |
relativeSup |
The wanted relative min Support value. |
data("Transacfruits") ## Import and build Transafruits as binary matrix. binaryfruits = transactiontoBitmax (as.matrix(Transacfruits),",") itemsets = prefrecset (binaryfruits, names(binaryfruits), 0.02) ## Mine frequents itemSet from Transacfruits with a relative min support of 0.02.
data("Transacfruits") ## Import and build Transafruits as binary matrix. binaryfruits = transactiontoBitmax (as.matrix(Transacfruits),",") itemsets = prefrecset (binaryfruits, names(binaryfruits), 0.02) ## Mine frequents itemSet from Transacfruits with a relative min support of 0.02.
The Transacfruits dataset is a synthetic database. It thus represents fictitious transactions, simulating fruit purchases, among a random list.
data("Transacfruits")
data("Transacfruits")
Transacfruits is made up of 1 columns and 100 rows. There are therefore 100 transactions. For each of them one or more fruits were purchased from a list of 15 fruits. It was generated by binomial simulation, for all transactions, there was for each fruit a fixed probability p of being bought.
Returns the corresponding Binary R DataFrame. If you imported your transaction as R DataFrame, please use the R function as.matrix(yourdataframe).
transactiontoBitmax(transac , deli)
transactiontoBitmax(transac , deli)
transac |
a character vector or matrix. |
deli |
The character used to delimit the objects present in a transaction. |
data("Transacfruits") binaryfruits = transactiontoBitmax (as.matrix(Transacfruits),",") ## Import transaction data Transacfruits and create the correspondant binary matrix.
data("Transacfruits") binaryfruits = transactiontoBitmax (as.matrix(Transacfruits),",") ## Import transaction data Transacfruits and create the correspondant binary matrix.