Market Basket Analysis using Apriori Algorithm
In this repository, we conduct Market Basket Analysis (MBA) using the Apriori algorithm to generate association rules for the MBA dataset.
Overview:
Market Basket Analysis is a technique used to uncover associations between items purchased together in transactions. The Apriori algorithm is a popular method for performing MBA.
Main Points:
Data Loading and Preprocessing:
We load the MBA dataset containing transactional data. Perform preprocessing tasks such as handling missing values and formatting the data appropriately for MBA. Apriori Algorithm:
Apply the Apriori algorithm to the preprocessed dataset to generate association rules. Analysis and Visualization:
Analyze the generated association rules to uncover insights into item relationships. Visualize the data using histograms and other visualization techniques to gain a better understanding. Conclusion and Recommendations:
Summarize the findings from the analysis. Provide recommendations based on the generated association rules for potential business actions.
Report: September, October, and November had the highest sales, while December and February had the least sales. Picnic items were frequently purchased in July due to summer holidays, while December baskets contained more winter-related items. Comparison of association rules for July and December revealed frequent purchases of certain items during these months. Recommendations include optimizing product placement and running promotions on popular products during specific months.
Running the Code: To run the Market Basket Analysis code:
Ensure you have Python installed on your system. Install the required dependencies specified in the requirements.txt file using pip. Run the Python script containing the Market Basket Analysis code. Review the generated association rules and analysis results.