liveBook · Manning

Vertical data format

As explained in Data Without Labels

A vertical data format represents sequence data by storing occurrences with their sequence identifiers and element positions rather than storing complete sequences horizontally.

Represents sequence data as rows containing a sequence ID, an element ID, and the items occurring at that position, instead of complete horizontal sequences. section 4.7.1

Use the format to prepare sequential pattern mining with SPADE:

  • Convert each sequence event into a sequence-ID and element-ID record. section 4.7.1
  • Scan the vertical records once to calculate frequencies for one-item sequences. section 4.7.1
  • Group each item by its sequence and element positions, then join matching sequence IDs. section 4.7.1
  • Determine order by comparing element IDs: an earlier position precedes a later position within the same sequence. section 4.7.1
Table 4.14 Vertical format for table 4.13
Sequence ID
Element ID
Items
1001
1
Milk
1001
2
Milk, Eggs, Bread
1001
3
Milk, Bread
1001
4
Sugar
1001
5
Bread, Apples
1002
1
Milk, Sugar
1002
2
Bread
1002
3
Eggs, Bread
1002
4
Milk, Cheese
1003
1
Cheese, Apples
1003
2
Milk, Eggs
1003
3
Sugar, Apples
1003
4
Bread
1003
5
Eggs
1004
1
Cheese, Bananas
1004
2
Milk, Apples
1004
3
Bread
1004
4
Eggs
1004
5
Bread

Inspect the vertical conversion of sequence data, including repeated sequence IDs and event positions. section 4.7.1

How Data Without Labels covers it

How deep it goes
Demonstrates conversion, frequency scanning, positional joins, and ordering, stopping at worked item-combination tables.
Examples
Uses Milk and Eggs occurrences across sequence IDs 1001–1004 to derive ordered patterns.
What you can do after
Apply it via pycspade to encode sequence data and run SPADE with a specified support threshold.
How it connects
Connects sequence IDs and element IDs with SPADE, sequential patterns, support thresholds, and table joins.

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.