How chandanc5525/telecom_customerchurn_predictionmodel works
This repository trains a telecom churn classifier and serves predictions through a Streamlit form. The training workflow reads the churn dataset, prepares and reduces features, trains and evaluates an AutoML classifier, then saves the model package. The deployment app loads that package and applies the saved preprocessing, dimensionality reduction, and classifier to customer inputs. The README also describes experiment tracking and model versioning; sampled code shows MLflow logging and DagsHub initialization, but not a separate version-management workflow.
Main entry points: model_building.py Model building · app.py Prediction form · churn_model.pkl Model package · main.py Training entry
Components 19
Model training
- Training entry
main.py - Data ingestion
src/data_ingestion.py - Feature preparation
src/data_preprocessing.py - Train test split
src/data_preprocessing.py - Impute and encode
src/data_preprocessing.py - Class balancing
src/data_preprocessing.py - SVD reduction
src/data_preprocessing.py - Model building
src/model_building.py - AutoML training
src/model_building.py - Model evaluation
src/model_building.py - Model package
models/churn_model.pkl
Prediction serving
- Prediction form
Deployment/app.py - Saved preprocessor
Deployment/app.py - Saved SVD
Deployment/app.py - Churn prediction
Deployment/app.py
Experiment tracking
- DagsHub service
- MLflow tracking
Other components
- Retention user
- Churn dataset
data/churn.csv
Connections 21
- Retention user → Prediction form: enters customer details
- Prediction form → Model package: loads package
- Training entry → Data ingestion: calls ingestion
- Data ingestion → Churn dataset: reads CSV
- Training entry → Feature preparation: calls preprocessing
- Feature preparation → Train test split: splits data
- Train test split → Impute and encode: transforms features
- Impute and encode → Class balancing: resamples training data
- Class balancing → SVD reduction: reduces features
- Training entry → Model building: calls model building
- Model building → AutoML training: trains classifier
- Model building → Model evaluation: evaluates classifier
- Model building → DagsHub service: initializes tracking
- Model building → MLflow tracking: logs run and metrics
- Model building → Model package: writes package
- Model package → Saved preprocessor: provides preprocessor
- Model package → Saved SVD: provides SVD
- Model package → Churn prediction: provides classifier
- Prediction form → Saved preprocessor: transforms input
- Prediction form → Saved SVD: reduces input
- Prediction form → Churn prediction: predicts churn