Wolfram Language Paclet Repository
Community-contributed installable additions to the Wolfram Language
Functions for association rule learning
Contributed by: Anton Antonov
The provided Association rule learning functions find frequent sets and association rules in datasets, lists of lists, and sparse matrices.
To install this paclet in your Wolfram Language environment,
evaluate this code:
PacletInstall["AntonAntonov/AssociationRuleLearning"]
To load the code after installation, evaluate this code:
Needs["AntonAntonov`AssociationRuleLearning`"]
Here we get the Titanic dataset:
In[1]:= |
Out[3]= |
Here we find the frequent sets of variable values in the Titanic data that appear more than 130 times (using Eclat):
In[4]:= |
Out[4]= |
Here we keep only the frequent sets with three elements:
In[5]:= |
Out[5]= |
Let us verify the result above using a tries with frequencies. Here we a make a trie over the same data given to Eclat and plot it:
In[6]:= |
Out[8]= |
Here we retrieve the frequencies from trie using the frequent sets found by Eclat:
In[9]:= |
Out[9]= |
Here we find using Apriori the frequent sets of variable values in the Titanic data that appear more than 130 times and having the result as an Association of the frequent sets with the corresponding support values:
In[10]:= |
Out[10]= |
Wolfram Language Version 13.0