spmviz.viz.plot_prefix_tree#

spmviz.viz.plot_prefix_tree(obj, ax=None, max_depth=4, min_count=1, anchor=None, color_by='item', groups=None, positive=None, orient='left', labels=True, top=14, width=(0.4, 9.0), max_children=None, title=None)[source]#

Node-link prefix tree with edges as wide as the number of sequences passing.

Parameters:
objSequenceDatabase or PatternSet

Raw prefixes of a database or the pattern tree of mined patterns.

color_by{“item”, “entropy”, “contrast”}

Item colors; continuation entropy of the node (green = predictable next event, vermilion = branching point; entropy tree); or the log-ratio of two groups (groups=; contrast tree).

orient{“left”, “top”}
min_count, max_childrenint, optional

Drop rare nodes; keep only the most frequent children of every node.

Returns:
matplotlib.axes.Axes

Examples using spmviz.viz.plot_prefix_tree#

An everyday example: daily routines

An everyday example: daily routines

Where does the process branch? The continuation-entropy tree

Where does the process branch? The continuation-entropy tree

Case study: the UWV unemployment-benefit application

Case study: the UWV unemployment-benefit application

Case study: early warning in alarm management

Case study: early warning in alarm management