1. Executive Summary
SuperKart is a strategic machine learning initiative designed to enhance the e-commerce user experience through personalized product discovery. By analyzing customer transaction history and rating patterns, this project developed a multi-tiered recommendation system capable of predicting user preferences with high accuracy. The final solution utilized Matrix Factorization (SVD) to deliver personalized suggestions, significantly improving potential cross-selling opportunities and user engagement compared to generic popularity-based baselines.
2. Business Context & Problem Statement
The Challenge
In the competitive e-commerce landscape, users are often overwhelmed by vast product catalogs, leading to decision paralysis and abandoned carts. SuperKart faced the classic "choice overload" problem:
- Generic Experience: New and existing users were seeing the same static product lists, failing to leverage individual taste profiles.
- Missed Revenue: Without personalized suggestions, the platform was missing critical cross-selling and up-selling opportunities.
- Data Utilization: Despite having rich transaction data (user ratings and purchase history), the platform lacked an automated engine to translate this data into actionable insights.
The Objective
The goal was to build a robust Recommendation System capable of:
- Addressing the Cold Start Problem for new users.
- Providing highly personalized product suggestions for existing users.
- Minimizing prediction error (RMSE) to ensure recommended products genuinely align with user preferences.
3. Technical Architecture & Methodology
Data Strategy
The project utilized a substantial dataset of electronic product ratings, comprising User IDs, Product IDs, and Ratings (1-5 scale).
- Exploratory Data Analysis (EDA): Analysis revealed a "long-tail" distribution where a small number of popular products received the majority of ratings, while most users rated very few items. This sparsity highlighted the need for advanced matrix factorization techniques over simple neighbor-based methods.
- Data Filtering: To ensure statistical significance, the dataset was filtered to include only users who had rated at least 50 items and products that had received at least 50 ratings.
Model Development Pipeline
A multi-model approach was adopted to benchmark performance and handle different user scenarios:
A. Rank-Based Recommendation (Baseline)
- Methodology: Calculated the average rating for all products and sorted them by the count of ratings to identify "trending" items.
- Use Case: Solves the Cold Start problem by providing high-confidence recommendations (e.g., top-selling electronics) to new users with no purchase history.
B. Collaborative Filtering (Similarity-Based)
- Methodology: Implemented User-User and Item-Item Collaborative Filtering using Cosine Similarity and Pearson Correlation.
- Logic: "Users who liked this item also liked..." (Item-Item) vs. "Users similar to you liked..." (User-User).
- Outcome: While effective for dense data, this approach struggled with scalability and sparsity, leading to higher computation times.
C. Matrix Factorization (Model-Based)
- Methodology: Deployed Singular Value Decomposition (SVD) using the
Surpriselibrary. This technique decomposes the user-item interaction matrix into latent factors, effectively capturing hidden patterns in user behavior. - Optimization: Hyperparameter tuning (Grid Search) was performed to optimize learning
rates (
lr_all) and regularization terms (reg_all), minimizing overfitting.
4. Key Results and Evaluation
The models were evaluated using Root Mean Square Error (RMSE), a standard metric for measuring the difference between predicted ratings and actual user ratings.
Performance Highlights
- SVD Superiority: The SVD model achieved the lowest RMSE of ~0.87, significantly outperforming the KNN-based collaborative filtering models. This indicates that the model's predicted ratings were, on average, less than 1 star away from the user's actual rating.
- Personalization: The SVD model successfully generated a list of top-5 personalized product recommendations for specific User IDs, demonstrating its ability to tailor content to individual tastes.
- Scalability: Unlike the memory-intensive KNN models, the Matrix Factorization approach proved more scalable for larger datasets, making it the viable choice for production deployment.
5. Future Scope & Recommendations
To transition this prototype into a live enterprise solution, the following enhancements are recommended:
- Hybrid Engine: Implement a hybrid system that weights SVD scores with real-time popularity trends to balance personalization with trendiness.
- Implicit Feedback: Incorporate implicit data (clicks, view time, cart additions) alongside explicit ratings to capture user intent more granularly.
- Real-Time Serving: Deploy the model via an API (e.g., Flask or FastAPI) to serve recommendations dynamically at checkout or on the homepage.