Built in data structures

FPTree

ModalAssociationRules.FPTreeType
mutable struct FPTree
    content::Union{Nothing,Item}        # Item contained in this node (nothing if root)

    parent::Union{Nothing,FPTree}       # parent node
    const children::Vector{FPTree}      # children nodes

    count::Int64                        # number of equal Items this node represents

    link::Union{Nothing,FPTree}         # link to another FPTree root
end

Fundamental data structure used in FP-Growth algorithm. Essentialy, an FPTree is a prefix tree where a root-leaf path represent an Itemset.

Consider the Itemsets sorted by gsupport of their items. An FPTree is such that the common Items-prefix shared by different Itemsets is not stored multiple times.

This implementation generalizes the propositional logic case scenario to modal logic; given two Itemsets sharing a Item prefix, the worlds in which they are true is accumulated.

Info

Did you notice? One FPTree structure contains all the information needed to construct an EnhancedItemset. This is crucial to generate new FPTrees during fpgrowth algorithm, via building ConditionalPatternBase iteratively while avoiding visiting the dataset over and over again.

See also EnhancedItemset, fpgrowth, gsupport, Item, Itemset, WorldMask.

source
ModalAssociationRules.children!Method
children!(fptree::FPTree, child::FPTree)

Add a new FPTree to fptree's children vector.

Warning

This method forces the new children to be added: it is a caller's responsability to check whether child is not already a children of fptree and, if so, handle the case. This check is performed, for example, in grow!.

Note

This method already sets the new children parent to fptree itself.

See also children, FPTree.

source
Base.countMethod
Base.count(fptree::FPTree)::Int64

Getter for the fptree internal counter. Essentially, it represents the number of overlappings Item which ended up in fptree node during the building process of the tree itself.

See also count!, FPTree, Item.

source
Missing docstring.

Missing docstring for contributors(fptree::FPTree). Check Documenter's build log for details.

Missing docstring.

Missing docstring for contributors!(fptree::FPTree, contribution::WorldMask). Check Documenter's build log for details.

Missing docstring.

Missing docstring for addcontributors!(fptree::FPTree, contribution::WorldMask). Check Documenter's build log for details.

Missing docstring.

Missing docstring for Base.push!(fptree::FPTree, itemset::Itemset, ninstance::Int64, miner::Miner; htable::Union{Nothing,HeaderTable}=nothing). Check Documenter's build log for details.

Missing docstring.

Missing docstring for retrieveall(fptree::FPTree). Check Documenter's build log for details.

Missing docstring.

Missing docstring for prune!(fptree::FPTree, miner::Miner). Check Documenter's build log for details.

HeaderTable