Market Basket Analysis & Product Bundling Optimizing Cross-Selling Strategy using Apriori Algorithm

How do we know which products are frequently bought together? Using the Apriori Algorithm, this project analyzes transaction data to uncover purchasing patterns, enabling data-driven cross-selling strategies.
Support How popular an itemset is (e.g., 17.9% of orders contain Item A).
Confidence Likelihood of buying Item B if Item A is purchased (e.g., 73% chance).
Lift Strength of association (Lift > 1 means strong correlation).
The analysis began with cleaning and transforming raw transaction data into a structured basket format. The Apriori algorithm was then applied to mine hidden relationship patterns within thousands of transactions. The strength of each product association was evaluated using Support, Confidence, and Lift metrics to distinguish valid patterns from random occurrences. Finally, strong association rules (e.g., If buy A, then 70% buy B) were translated into concrete business strategies, such as product bundling recommendations and catalog layout optimization to drive Cross-Selling.

🏆 Top 5 Strongest Association Rules

If Customer Buys... (Antecedent) They Also Buy... (Consequent) Confidence Lift Score
Childs Garden Fork Blue Childs Garden Trowel Blue 93.1% 68.88
Poppy's Playhouse Kitchen & Bedroom Poppy's Playhouse Bathroom 91.5% 66.70
Childs Garden Fork Pink Childs Garden Trowel Pink 81.9% 66.47
White Hanging Heart Holder Red Hanging Heart Holder 72.3% 4.04
Jumbo Bag Pink Polkadot Jumbo Bag Red Retrospot 72.6% 7.50

*Showing top 5 rules sorted by Lift. Full table available in the project link below.

💡 Key Associations Found

  • The "Poppy's Playhouse" Effect: Customers who bought 'Poppy's Playhouse Kitchen' and 'Bedroom' had a 91.5% probability (Confidence) of also buying the 'Bathroom' set.
  • Garden Set Bundling: A very strong association (Lift > 60) was found between 'Childs Garden Fork Blue' and 'Childs Garden Trowel Blue', indicating these items are almost always bought as a pair.
  • Most Popular Item: The 'White Hanging Heart T-Light Holder' is the bestseller, appearing in 17.9% of all transactions.

🚀 Business Recommendations

📦 Create Product Bundles

Bundle the "Poppy's Playhouse" series or the "Childs Garden" sets into a single package price. This simplifies the shopping experience and increases Average Order Value (AOV).

🛒 Optimization of Website Layout

Place the 'White Hanging Heart T-Light Holder' on the homepage to drive traffic. For product pages, add a "Frequently Bought Together" widget recommending associated items (e.g., recommend Trowel when viewing Fork).

📂 Project Documentation

The content above is a condensed summary of the analysis results. The full project resources, including detailed code and data cleaning steps, are available below:

  • Data Cleansing: Handling cancellations (C-orders) and outliers.
  • Apriori Implementation: Code for generating frequent itemsets & rules.
  • Metric Evaluation: Calculation of Support, Confidence, and Lift.