The following example explains the market basket analysis of a test dataset.
The following is a test dataset that considers the edge cases, and is exhaustive to capture all nuances. The dataset contains 7 transactions across 3 different customers. Some transactions have only one product while some transactions have multiple products.
| Raw data (Transactions) | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Transaction Id | Customer Id | Product 1 name | Product 2 name | Product 1 category | Product 2 category | Product 1 label | Product 2 label | First product total quantity | Second product total quantity | Product 1 revenue | Product 2 revenue | Transaction revenue |
| 1 | 111 | Apple | Fruits | No discount | No discount | 2 | 100 | 100 | ||||
| 2 | 222 | Apple | Potato | Fruits | Vegetables | 15% off | 3 | 2 | 150 | 50 | 350 | |
| 3 | 111 | Tshirts | Clothing | 30% off | 3 | 450 | 450 | |||||
| 4 | 111 | Apple | Rose | Fruits | Flowers | Complementary | 4 | 2 | 200 | 400 | 600 | |
| 5 | 111 | Apple | Potato | Fruits | Vegetables | 25% off | 5 | 3 | 250 | 300 | 550 | |
| 6 | 333 | Potato | Tshirts | Vegetables | Clothing | 1 | 1 | 50 | 150 | 250 | ||
| 7 | 333 | Banana | Spinach | Fruits | Vegetables | 2 | 3 | 100 | 600 | 700 | ||
Report type : Transaction Level Analysis
Analysis by dimension : Product Name
| Product 1 name | Product 2 name | First Product Total Quantity | Second Product Total Quantity | First Product Total Transaction Count | Second Product Total Transaction Count | Combined Total Count | First product total sales revenue | Second product total sales revenue | Combined sales revenue | First product sales revenue contribution | Second product sales revenue contribution | Support | Confidence | Lift |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Apple | Potato | 14 | 6 | 4 | 3 | 2 | 700 | 600 | 900 | 400 | 500 | 28.57% | 50.00% | 1.75 |
| Apple | Rose | 14 | 2 | 4 | 1 | 1 | 700 | 400 | 600 | 200 | 400 | 14.29% | 25.00% | 1.75 |
| Potato | Tshirts | 6 | 4 | 3 | 1 | 1 | 600 | 150 | 250 | 100 | 150 | 14.29% | 33.33% | 2.33 |
| Banana | Spinach | 2 | 3 | 1 | 1 | 1 | 100 | 600 | 700 | 100 | 600 | 14.29% | 100.00% | 7.00 |
The following is the detailed analysis:
Report type : Customer Level Analysis
Analysis by dimension : Product Name
| Product category 1 | Product category 2 | First product category total quantity | Second product category total quantity | First product total transaction count | Second product total transaction Count | Combined total count | First product total sales revenue | Second product total sales revenue | Combined sales revenue | First product category sales revenue contribution | Second product category sales revenue contribution |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Apple | Tshirts | 14 | 4 | 4 | 2 | 1 | 700 | 600 | 550 | 100 | 450 |
| Apple | Rose | 14 | 2 | 4 | 1 | 1 | 700 | 400 | 500 | 100 | 400 |
| Apple | Potato | 14 | 6 | 4 | 3 | 2 | 700 | 400 | 900 | 300 | 600 |
| Tshirts | Apple | 4 | 14 | 2 | 4 | 2 | 600 | 700 | 1350 | 900 | 450 |
| Tshirts | Rose | 4 | 2 | 2 | 1 | 1 | 600 | 400 | 850 | 450 | 400 |
| Rose | Apple | 2 | 14 | 1 | 4 | 1 | 400 | 700 | 650 | 400 | 250 |
| Rose | Potato | 2 | 6 | 1 | 3 | 1 | 400 | 400 | 700 | 400 | 300 |
| Potato | Banana | 6 | 2 | 3 | 1 | 1 | 400 | 100 | 200 | 100 | 100 |
| Potato | Spinach | 6 | 3 | 3 | 1 | 1 | 400 | 600 | 700 | 100 | 600 |
| Tshirts | Banana | 4 | 2 | 2 | 1 | 1 | 600 | 100 | 250 | 150 | 100 |
| Tshirts | Spinach | 4 | 3 | 2 | 1 | 1 | 600 | 600 | 750 | 150 | 600 |
| Tshirts | Potato | 4 | 6 | 2 | 3 | 1 | 600 | 400 | 750 | 450 | 300 |
The following is the detailed analysis:
For customer level analysis, combinations or baskets are formed by considering subsequent transactions for a particular customer. For example, for customer id “111”, with transaction id “1”, the customer bought Apple. The next transaction of customer “111” was Tshirt with transaction id “3”. Thus, a valid basket in customer level analysis is Apple and Tshirt. Similarly, other valid combinations or baskets considering only customer id “111” can be:
Thus, Transaction Level Analysis focuses on intra-transactional combinations while Customer Level Analysis focuses on inter-transactional combinations.
Report type : Transaction Level Analysis
Analysis by dimension : Product Category
| Product Category 1 | Product Category 2 | First product category total quantity | Second product category total quantity | First product category total transaction count | Second product category total transaction count | Combined transaction total count | First product category total sales revenue | Second product category total sales revenue | Combined sales revenue | First product category sales revenue contribution | Second product category sales revenue contribution |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Fruits | Vegetables | 16 | 9 | 5 | 3 | 3 | 800 | 1200 | 1600 | 500 | 1100 |
| Fruits | Flowers | 16 | 2 | 5 | 1 | 1 | 800 | 400 | 600 | 200 | 400 |
| Vegetables | Clothing | 9 | 4 | 3 | 2 | 1 | 1200 | 600 | 250 | 100 | 150 |
The following is the detailed analysis:
If this content did not answer your questions, try searching or contacting our support team for further assistance.
The following example explains the market basket analysis of a test dataset.
The following is a test dataset that considers the edge cases, and is exhaustive to capture all nuances. The dataset contains 7 transactions across 3 different customers. Some transactions have only one product while some transactions have multiple products.
| Raw data (Transactions) | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Transaction Id | Customer Id | Product 1 name | Product 2 name | Product 1 category | Product 2 category | Product 1 label | Product 2 label | First product total quantity | Second product total quantity | Product 1 revenue | Product 2 revenue | Transaction revenue |
| 1 | 111 | Apple | Fruits | No discount | No discount | 2 | 100 | 100 | ||||
| 2 | 222 | Apple | Potato | Fruits | Vegetables | 15% off | 3 | 2 | 150 | 50 | 350 | |
| 3 | 111 | Tshirts | Clothing | 30% off | 3 | 450 | 450 | |||||
| 4 | 111 | Apple | Rose | Fruits | Flowers | Complementary | 4 | 2 | 200 | 400 | 600 | |
| 5 | 111 | Apple | Potato | Fruits | Vegetables | 25% off | 5 | 3 | 250 | 300 | 550 | |
| 6 | 333 | Potato | Tshirts | Vegetables | Clothing | 1 | 1 | 50 | 150 | 250 | ||
| 7 | 333 | Banana | Spinach | Fruits | Vegetables | 2 | 3 | 100 | 600 | 700 | ||
Report type : Transaction Level Analysis
Analysis by dimension : Product Name
| Product 1 name | Product 2 name | First Product Total Quantity | Second Product Total Quantity | First Product Total Transaction Count | Second Product Total Transaction Count | Combined Total Count | First product total sales revenue | Second product total sales revenue | Combined sales revenue | First product sales revenue contribution | Second product sales revenue contribution | Support | Confidence | Lift |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Apple | Potato | 14 | 6 | 4 | 3 | 2 | 700 | 600 | 900 | 400 | 500 | 28.57% | 50.00% | 1.75 |
| Apple | Rose | 14 | 2 | 4 | 1 | 1 | 700 | 400 | 600 | 200 | 400 | 14.29% | 25.00% | 1.75 |
| Potato | Tshirts | 6 | 4 | 3 | 1 | 1 | 600 | 150 | 250 | 100 | 150 | 14.29% | 33.33% | 2.33 |
| Banana | Spinach | 2 | 3 | 1 | 1 | 1 | 100 | 600 | 700 | 100 | 600 | 14.29% | 100.00% | 7.00 |
The following is the detailed analysis:
Report type : Customer Level Analysis
Analysis by dimension : Product Name
| Product category 1 | Product category 2 | First product category total quantity | Second product category total quantity | First product total transaction count | Second product total transaction Count | Combined total count | First product total sales revenue | Second product total sales revenue | Combined sales revenue | First product category sales revenue contribution | Second product category sales revenue contribution |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Apple | Tshirts | 14 | 4 | 4 | 2 | 1 | 700 | 600 | 550 | 100 | 450 |
| Apple | Rose | 14 | 2 | 4 | 1 | 1 | 700 | 400 | 500 | 100 | 400 |
| Apple | Potato | 14 | 6 | 4 | 3 | 2 | 700 | 400 | 900 | 300 | 600 |
| Tshirts | Apple | 4 | 14 | 2 | 4 | 2 | 600 | 700 | 1350 | 900 | 450 |
| Tshirts | Rose | 4 | 2 | 2 | 1 | 1 | 600 | 400 | 850 | 450 | 400 |
| Rose | Apple | 2 | 14 | 1 | 4 | 1 | 400 | 700 | 650 | 400 | 250 |
| Rose | Potato | 2 | 6 | 1 | 3 | 1 | 400 | 400 | 700 | 400 | 300 |
| Potato | Banana | 6 | 2 | 3 | 1 | 1 | 400 | 100 | 200 | 100 | 100 |
| Potato | Spinach | 6 | 3 | 3 | 1 | 1 | 400 | 600 | 700 | 100 | 600 |
| Tshirts | Banana | 4 | 2 | 2 | 1 | 1 | 600 | 100 | 250 | 150 | 100 |
| Tshirts | Spinach | 4 | 3 | 2 | 1 | 1 | 600 | 600 | 750 | 150 | 600 |
| Tshirts | Potato | 4 | 6 | 2 | 3 | 1 | 600 | 400 | 750 | 450 | 300 |
The following is the detailed analysis:
For customer level analysis, combinations or baskets are formed by considering subsequent transactions for a particular customer. For example, for customer id “111”, with transaction id “1”, the customer bought Apple. The next transaction of customer “111” was Tshirt with transaction id “3”. Thus, a valid basket in customer level analysis is Apple and Tshirt. Similarly, other valid combinations or baskets considering only customer id “111” can be:
Thus, Transaction Level Analysis focuses on intra-transactional combinations while Customer Level Analysis focuses on inter-transactional combinations.
Report type : Transaction Level Analysis
Analysis by dimension : Product Category
| Product Category 1 | Product Category 2 | First product category total quantity | Second product category total quantity | First product category total transaction count | Second product category total transaction count | Combined transaction total count | First product category total sales revenue | Second product category total sales revenue | Combined sales revenue | First product category sales revenue contribution | Second product category sales revenue contribution |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Fruits | Vegetables | 16 | 9 | 5 | 3 | 3 | 800 | 1200 | 1600 | 500 | 1100 |
| Fruits | Flowers | 16 | 2 | 5 | 1 | 1 | 800 | 400 | 600 | 200 | 400 |
| Vegetables | Clothing | 9 | 4 | 3 | 2 | 1 | 1200 | 600 | 250 | 100 | 150 |
The following is the detailed analysis:
If this content did not answer your questions, try searching or contacting our support team for further assistance.