spmviz.viz.tree_data#

spmviz.viz.tree_data(obj, max_depth=4, min_count=1, anchor=None, groups=None, positive=None, max_children=None)[source]#

The tree behind the tree views: a prefix tree of a database or the pattern tree of a pattern set.

min_count drops nodes passed by fewer sequences (for a pattern set: patterns with a lower absolute support); max_children keeps only the most frequent children of every node, which tames wide trees. With groups (attribute name or labels) every node also gets the counts of the positive group and of the rest and their log2_ratio (contrast trees).