Utilities

The following utilities often involve performing some combinatoric trick between Itemsets and ARules, and might be useful to avoid reinventing the wheel.

Items and Itemsets

ModalAssociationRules.combine_itemsFunction
combine_items(itemsets::AbstractVector{<:Itemset}, newlength::Integer)

Return a generator which combines Itemsets from itemsets into new itemsets of length newlength by taking all combinations of two itemsets and joining them.

See also Itemset.

source
combine_items(variable::AbstractVector{<:Item}, fixed::AbstractVector{<:Item})

Return a generator of Itemset, which iterates the combinations of Items in variable and prepend them to fixed vector.

See also Item, Itemset.

source
ModalAssociationRules.grow_pruneFunction
grow_prune(
    candidates::AbstractVector{Itemset},
    frequents::AbstractVector{Itemset},
    k::Integer
)

Return a generator, which yields only the candidates for which every (k-1)-length subset is in frequents.

See also Itemset.

source
Missing docstring.

Missing docstring for coalesce_contributors(itemset::Itemset, miner::Miner; localmeasure::Function=lsupport). Check Documenter's build log for details.

Association rules

ModalAssociationRules.generaterulesMethod

generaterules(itemsets::AbstractVector{Itemset}, miner::AbstractMiner)

Raw subroutine of generaterules!(miner::AbstractMiner; kwargs...).

Generates ARule from the given collection of itemsets and miner.

The strategy followed is described here at section 2.2.

To establish the meaningfulness of each association rule, check if it meets the global constraints specified in arulemeasures(miner), and yields the rule if so.

See also AbstractMiner, ARule, Itemset, arulemeasures.

source
generaterules(itemsets::AbstractVector{Itemset}, miner::Miner)

See generaterules(::AbstractVector{Itemset}, ::AbstractMiner).

source