liveBook · Manning

Frequent sequence

As explained in Data Without Labels

A sequence of items or events that occurs at least as often as a specified frequency threshold in a dataset.

A frequent sequence is an ordered pattern of items or events that meets a chosen frequency threshold in a dataset. Sequential mining searches for these patterns and stops when no further frequent sequences can be found. section 4.7.1

SPADE works with sequence IDs and element IDs. It combines matching sequence entries, joins shorter sequences, and extends candidates only while they remain frequent. section 4.7.1

Milk, Eggs -> Milk

For sequence ID 1001, Milk occurs at element 1, Eggs at element 2, and Milk again at element 3. The resulting three-item sequence is retained for the matching records. A Python run can mine the dataset with pycspade using support=0.6 and print the results. section 4.7.1

Table 4.13 The dataset for sequence mining
Sequence ID
Sequence
1001
<(Milk) (Milk, Eggs, Bread) (Milk, Bread) (Sugar) (Bread, Apples)>
1002
<(Milk, Sugar) (Bread) (Eggs, Bread) (Milk, Cheese)>
1003
<(Cheese, Apples) (Milk, Eggs) (Sugar, Apples) (Bread) (Eggs)>
1004
<(Cheese, Bananas) (Milk, Apples) (Bread) (Eggs) (Bread)>

Inspect the sequence dataset used to represent ordered item groups before mining. section 4.7.1

How Data Without Labels covers it

How deep it goes
Explains sequence and element identifiers, candidate joins, stopping conditions, and a Python implementation, but defers algorithmic internals.
Examples
Uses Milk, Eggs, Bread, Sugar, Apples, Cheese, and Bananas across sequence IDs 1001–1004.
What it assumes
Assumes sequence IDs, element IDs, ordered item groups, and support thresholding.
What you can do after
Apply it via pycspade to mine sequences at a chosen support threshold and print the resulting patterns.
How it connects
Connects sequential pattern discovery with association rules, support, vertical data formats, and SPADE.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data Without Labels. The section links point to the parts of the book it draws on.