API Reference
ARules.apriori
— Methodapriori(occurrences, item_lkup; supp, conf, maxlen)
Given an boolean occurrence matrix of transactions (rows are transactions, columns are items) and a lookup dictionary of column-index to items-string, this function runs the a-priori algorithm for generating frequent item sets. These frequent items are then used to generate association rules. The supp
argument allows us to stipulate the minimum support required for an itemset to be considered frequent. The conf
argument allows us to exclude association rules without at least conf
level of confidence. The maxlen
argument stipulates the maximum length of an association rule (i.e., total items on left- and right-hand sides)
ARules.apriori
— Methodapriori(transactions; supp, conf, maxlen)
Given an array of transactions (a vector of string vectors), this function runs the a-priori algorithm for generating frequent item sets. These frequent items are then used to generate association rules. The supp
argument allows us to stipulate the minimum support required for an itemset to be considered frequent. The conf
argument allows us to exclude association rules without at least conf
level of confidence. The maxlen
argument stipulates the maximum length of an association rule (i.e., total items on left- and right-hand sides)
ARules.frequent
— Methodfrequent()
This function just acts as a bit of a convenience function that returns the frequent item sets and their support count (integer) when given and array of transactions. It basically just wraps frequentitemtree() but gives back the plain text of the items, rather than that Int16 representation.
ARules.frequent_item_tree
— Methodfrequentitemtree(occurrences, minsupp, maxdepth)
This function creates a frequent itemset tree from an occurrence matrix. The tree is built recursively using calls to the growtree!() function. The minsupp
and maxdepth
parameters control the minimum support needed for an itemset to be called "frequent", and the max depth of the tree, respectively
ARules.frequent_item_tree
— Methodfrequent_item_tree(transactions, minsupp, maxdepth)
This function creates a frequent itemset tree from an array of transactions. The tree is built recursively using calls to the growtree!() function. The minsupp
and maxdepth
parameters control the minimum support needed for an itemset to be called "frequent", and the max depth of the tree, respectively