Market basket analysis identifies relationships among items purchased in the same transaction. Association rules express these relationships as antecedents leading to consequents, such as milk and eggs → bread, and support merchandising, recommendations, marketing, and diagnosis. section 4.11 section 4.2
A practical analysis follows this path:
- Define the business problem, such as improving store layout or product placement. section 4.8
- Discover and load historical transactions, then convert invoice-style records into a format association-rule algorithms can consume. section 4.8
- Generate and filter rules using support, confidence, lift, and conviction; higher values indicate stronger or more useful relationships. section 4.11
- Choose a mining approach: Apriori uses bottom-up candidate generation, ECLAT uses depth-first search, and F-P growth uses a frequent-pattern tree. section 4.11
Improving supermarket layout
If transactions show that customers frequently buy milk and bread together, placing bread near the milk counter can make products easier to find and guide a planogram. The same pattern can inform marketing or pricing decisions. section 4.8 section 4.11
Table 4.20 Example of invoices generated in a real-world retail store
|
Invoice number
|
Date
|
Items
|
Amount
|
|---|---|---|---|
|
1001
|
01-Jun-21
|
Milk, Eggs, Cheese, Bread
|
$10
|
|
1002
|
01-Jun-21
|
Bread, Bananas, Apples, Butter
|
$15
|
|
1003
|
01-Jun-21
|
Butter, Carrots, Cheese, Eggs, Bread, Milk, Bananas
|
$19
|
|
1004
|
01-Jun-21
|
Milk
|
$1
|
|
1005
|
01-Jun-21
|
Bread
|
$0.80
|
Inspect invoice records containing dates, item lists, and amounts to see the transaction data that must be transformed before rule mining. section 4.8
