spmviz.predict.predict_next#

spmviz.predict.predict_next(source, observed, k=5, min_support=2)[source]#

Most likely next events after an observed partial sequence.

Parameters:
sourcePatternSet or SequenceDatabase

With a pattern set, the extensions of the matched context are ranked by confidence; with a database, the empirical continuation of the longest suffix seen at least min_support times is used (end of sequence included).

observedpattern

The events seen so far.

kint
Returns:
pandas.DataFrame

Columns next, probability (confidence), support, context.