Data and AI
E-Commerce Customer Churn & LTV Dashboard
The pipeline builds RFM features from a transaction log, trains gradient boosting models for churn and future lifetime value, and shows the results in a Streamlit dashboard. Features come from a 90-day window before a cutoff and labels from the 90 days after it, so the models predict actual future purchases and spend.
Overview
Install
- Install the dependencies.
pip install -r requirements.txt
- Generate the transaction log at
data/transactions.csv.
python generate_data.py
- Train the models. This writes
models/*.jobliband prints AUC and MAE.
python train.py
- Start the dashboard.
streamlit run app.py
- Run the smoke test for the feature and label logic.
python test_pipeline.py
Docs
The full documentation covers how it works, configuration and results.