How pifarhan/customer-churn-prediction works
This repository is a customer-churn analytics and prediction application. Its user-facing workflow collects a customer profile, applies a saved Random Forest pipeline, and presents churn probability, a business-defined risk band, behavioral indicators, and retention suggestions. A separate notebook documents the data-analysis and model-training lifecycle, while the Streamlit app also presents model performance and feature-importance information. The notebook’s implementation was not sampled, so its stages and links are based on README documentation; the app’s inference and recommendation behavior is visible in the excerpt.
Main entry points: app.py Streamlit dashboard · customer_churn_analysis.ipynb Data and model workflow · customer_churn_model.pkl Random Forest pipeline · customer_churn_dataset-testing-master.csv Customer data
Components 14
Analysis and Training
- Customer data
data/customer_churn_dataset-testing-master.csv - Data and model workflow
notebooks/customer_churn_analysis.ipynb
Model Artifacts
- Random Forest pipeline
models/customer_churn_model.pkl - Feature metadata
models/model_metadata.pkl
Prediction Dashboard
- Streamlit dashboard
app/app.py - Profile input
app/app.py - Churn inference
app/app.py - Model performance
app/app.py
Risk and Retention
- Risk classification
app/app.py - Behavioral indicators
app/app.py - Retention recommendations
app/app.py - Churn drivers
app/app.py
Other components
- Analyst
- Customer profile
Connections 13
- Analyst → Data and model workflow: analyzes data
README.md - Customer data → Data and model workflow: analyzed by
README.md - Data and model workflow → Random Forest pipeline: trains and saves
README.md - Customer profile → Streamlit dashboard: uses
README.md - Streamlit dashboard → Profile input: collects profile
app/app.py - Profile input → Churn inference: predicts churn
app/app.py - Streamlit dashboard → Random Forest pipeline: loads for inference
README.md - Streamlit dashboard → Feature metadata: uses feature metadata
README.md - Churn inference → Risk classification: assigns risk band
app/app.py - Churn inference → Behavioral indicators: shows indicators
README.md - Churn inference → Retention recommendations: suggests actions
app/app.py - Streamlit dashboard → Churn drivers: shows feature importance
README.md - Streamlit dashboard → Model performance: shows metrics
README.md