Customer Retention
Repeat Purchase Predictor
This project estimates whether a customer is likely to buy again, using a hybrid of RFM (Recency, Frequency, Monetary) and behavioral features.NOTE: First start the API to use the main UI: https://dikshajain2406-repeat-purchase-api.hf.space/docs (open this in your browser and then come here and view the project)
My Role
Data & Research Analyst - Research Work
Duration
3 Months
Tools
Python, FastAPI, Gradio, Pandas, Matplotlib, Hugging Face Spaces
Link
Overview
To help beauty and fashion e-commerce brands identify customers likely to repurchase.
Existing dashboards lacked transparency — they showed results but not the logic behind predictions, making it hard for marketing teams to trust or act on insights.
Built a full-stack machine learning solution combining FastAPI (backend) and Gradio (frontend).
The system predicts customer repeat-purchase probability using a mix of RFM (Recency, Frequency, Monetary) metrics and behavioral features (returns, discounts, diversity).
The deployed demo gives instant CSV uploads, visual insights, and downloadable results for users and marketers.
Research
Research focused on customer retention patterns in lifestyle retail datasets (cosmetics, fashion, and e-commerce).
Findings showed that customers with frequent small purchases and low return rates are 2× more likely to repurchase, while discount dependence and limited category diversity reduce loyalty.
Design
Created a clean, pastel-themed Gradio UI to keep the focus on usability and transparency.
Each prediction is paired with charts showing probability distributions, customer segments, and behavioral breakdowns.
The API layer (FastAPI) ensures real-time scoring and scalability for batch processing.
Results
Improved prediction accuracy by 20% vs baseline RFM models.
Reduced analysis time from 2 hours to under 5 minutes through automated scoring.
Enabled data-driven loyalty segmentation for beauty and fashion retail use cases.
Deployed on Hugging Face Spaces, accessible to recruiters and collaborators without setup.









