A sequence is an ordered collection of events. In transaction data, each event groups items bought together, and the event order records how purchases unfold over time. A k-item sequence contains k items across its events. section 4.7.1
Order also matters when recurrent neural networks process sequential data: each time step uses information carried forward from the previous hidden state. section 8.7.1
Purchases as a sequence
(Milk, Cheese) → (Bread, Eggs) → (Cheese, Bread, Sugar) represents three successive transactions, with items grouped by transaction. 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)>
|
Compare four sample customer sequences, with each transaction shown as an event. section 4.7.1





















