How mahesh-pepali/customer-churn-prediction works
This repository is a telecom customer-churn classification project, with a Streamlit interface as its user-facing product. Its main workflow cleans raw records, explores and prepares the data, trains and tunes classifiers, selects features and a decision threshold, then serves churn probabilities and decisions; evaluation reports classification metrics and plots. The README documents capabilities beyond the sampled training excerpt, including model serialization and tuning. Training internals are therefore summarized at the script level where details are incomplete; the documented model artifacts are not present in the supplied file tree.
Main entry points: train.py Model training · cleaned_data.csv Cleaned data · evaluate.py Model evaluation · app.py Streamlit interface
Components 18
Data preparation
- Data cleaning
src/data_preprocessing.py - Churn exploration
src/eda.py - Feature preparation
src/feature_engineering.py
Model development
- Model training
src/train.py - Class balancing
src/train.py - Classifier comparison
src/train.py - Feature selection
src/train.py - Hyperparameter tuning
src/train.py - Threshold optimization
src/train.py
Prediction and evaluation
- Saved model and threshold
src/train.py - Streamlit interface
src/app.py - Prediction script
src/predict.py - Model evaluation
src/evaluate.py - Metrics and plots
src/evaluate.py
Other components
- Analyst
- Raw churn data
data/raw/customer_churn.csv - Cleaned data
data/processed/cleaned_data.csv - Prediction user
Connections 19
- Data cleaning → Raw churn data: reads
- Data cleaning → Cleaned data: writes
- Churn exploration → Cleaned data: reads
- Feature preparation → Cleaned data: reads
- Model training → Cleaned data: reads
- Model training → Class balancing: handles
- Model training → Feature preparation: prepares
- Model training → Classifier comparison: trains
- Model training → Feature selection: selects
- Model training → Hyperparameter tuning: tunes
- Model training → Threshold optimization: optimizes
- Model training → Saved model and threshold: saves
- Prediction user → Streamlit interface: enters details
- Streamlit interface → Saved model and threshold: loads
- Streamlit interface → Prediction user: shows decision
- Prediction script → Saved model and threshold: loads
- Model evaluation → Saved model and threshold: loads
- Model evaluation → Cleaned data: reads
- Model evaluation → Metrics and plots: writes