Operational data can represent retail activity as transactions: recorded invoices containing all or some items purchased together. Each item has an identifier, and each transaction has a unique invoice number. section 4.3
For association analysis, transactions become a binary item-by-invoice representation. A value of 1 indicates that an item was purchased in the transaction; 0 indicates that it was not. section 4.2 section 4.3
A transaction dataset supports several practical checks and interpretations:
- Treat each invoice as one analytical occurrence rather than analyzing isolated product records. section 4.2
- Represent each transaction as a subset of the available item set. section 4.3
- Search many transactions for recurring co-occurrences that individual inspection would miss. section 4.2
Five supermarket invoices
Invoices 1001 and 1003 contain milk, eggs, and bread. Invoice 1002 contains only cheese; invoice 1004 contains eggs and cheese; invoice 1005 contains milk, eggs, and cheese. This compact matrix makes item co-occurrence visible and provides input for association rules such as {milk, bananas} -> {eggs}. section 4.2 section 4.3
Table 4.1 Examples of invoices generated in a supermarket
|
Invoice number
|
Milk
|
Eggs
|
Bread
|
Cheese
|
|---|---|---|---|---|
|
1001
|
1
|
1
|
1
|
0
|
|
1002
|
0
|
0
|
0
|
1
|
|
1003
|
1
|
1
|
1
|
0
|
|
1004
|
0
|
1
|
0
|
1
|
|
1005
|
1
|
1
|
0
|
1
|
Inspect the invoice matrix to see how transaction identifiers, items, and purchase indicators form operational data for association analysis. section 4.2

