spmviz.data.Constraints#

class spmviz.data.Constraints(min_gap=None, max_gap=None, max_span=None, gap_unit='index')[source]#

Bases: object

Gap and span constraints of an occurrence.

Parameters:
min_gap, max_gapint or float, optional

Bounds on the distance of consecutive matched elements, \(g_{\min}\le j_{k+1}-j_k\le g_{\max}\). In index units (default) max_gap=1 means adjacent elements (SPMF convention) and min_gap defaults to 1. In time units (gap_unit="time") the bounds apply to timestamp differences and min_gap defaults to 0.

max_spanint or float, optional

Bound on \(j_m-j_1\) (or \(t_{j_m}-t_{j_1}\)).

gap_unit{“index”, “time”}