How didar-ali-deed/customer-churn-prediction-ml works
This is a local, teaching-oriented telecom churn prediction project. Its main workflow audits and cleans customer data, reserves a stratified holdout, explores training data, engineers fold-safe features, compares and tunes models, selects a cost-based threshold from training out-of-fold predictions, evaluates once on the holdout, and produces SHAP explanations and single-customer predictions. The README documents the ordered stages; source excerpts confirm several key data and module dependencies. Some implementation details are unsampled, so edges are limited to documented or evidenced relationships.
Main entry points: split.py Stratified split · models Saved pipeline · raw Raw Telco CSV · train.py Model training
Components 17
Data preparation
- Raw Telco CSV
data/raw - Data audit
src/data.py - Data cleaning
src/data.py - Clean dataset
data/processed/clean.csv - Stratified split
src/split.py
Analysis and features
- Training-only EDA
src/eda.py - Business features
src/features.py - Fold-safe preprocessing
src/features.py
Modeling and evaluation
- Baseline comparison
src/train.py - Model training
src/train.py - Saved pipeline
models - Threshold selection
src/evaluate.py - Held-out evaluation
src/evaluate.py
Interpretation and use
- SHAP explanations
src/explain.py - Customer prediction
src/predict.py - Results summary
src/summary.py
Other components
- Project user
Connections 21
- Project user → Raw Telco CSV: provides data
README.md - Raw Telco CSV → Data audit: audits
src/data.py - Raw Telco CSV → Data cleaning: cleans
src/data.py - Data cleaning → Clean dataset: writes
src/data.py - Clean dataset → Stratified split: loads
src/split.py - Stratified split → Training-only EDA: supplies training rows
src/eda.py - Stratified split → Business features: supplies training rows
src/features.py - Stratified split → Baseline comparison: provides train split
src/train.py - Business features → Fold-safe preprocessing: builds
src/features.py - Fold-safe preprocessing → Model training: prepares pipeline
src/features.py - Model training → Saved pipeline: saves
- Model training → Threshold selection: supplies model and OOF scores
src/evaluate.py - Threshold selection → Held-out evaluation: locks cutoff before test
src/evaluate.py - Saved pipeline → Held-out evaluation: predicts holdout
src/evaluate.py - Saved pipeline → SHAP explanations: explains frozen model
src/explain.py - Saved pipeline → Customer prediction: scores customer
src/predict.py - Threshold selection → Customer prediction: provides cutoff
src/predict.py - Held-out evaluation → Results summary: summarizes results
src/summary.py - SHAP explanations → Results summary: summarizes findings
- Project user → Data audit: runs workflow
README.md - Project user → Customer prediction: requests score