How harshith1158/churn-mvp-using-xgboost-model- works
ChurnEngine generates or accepts customer data, trains an XGBoost churn model, scores customer records, and presents churn probabilities and health scores in a Streamlit dashboard. The main user-facing workflow is opening the dashboard to inspect aggregate metrics, charts, and at-risk customers. The repository also includes synthetic-data generation, optional BigQuery upload, model training, and a BigQuery-backed scoring agent. The sampled files show these stages, but not a single automated pipeline connecting them; the dashboard reads a report independently.
Main entry points: dashboard.py Streamlit dashboard · ai_agent.py Scoring agent · data_generator.py Synthetic generator · train_model.py Model trainer
Components 12
Data preparation
- Synthetic generator
data_generator.py - Training CSV
data/synthetic_churn_dataset.csv - BigQuery upload
data_generator.py
Model training
- Model trainer
train_model.py - Model artifacts
models
Churn scoring
- Scoring agent
agent/ai_agent.py - Churn report
data/customer_churn_health_report.csv
Dashboard
- Streamlit dashboard
dashboard/dashboard.py - Root launcher
dashboard.py - Metrics and charts
dashboard/dashboard.py
Other components
- Dashboard user
- BigQuery
Connections 12
- Synthetic generator → Training CSV: writes CSV
data_generator.py - Synthetic generator → BigQuery: uploads rows
- BigQuery upload → BigQuery: loads dataframe
data_generator.py - Model trainer → Training CSV: reads CSV
train_model.py - Model trainer → Model artifacts: saves model
train_model.py - Scoring agent → BigQuery: queries records
agent/ai_agent.py - Scoring agent → Model artifacts: loads model
agent/ai_agent.py - Scoring agent → Churn report: writes predictions
agent/ai_agent.py - Streamlit dashboard → Churn report: reads report
dashboard/dashboard.py - Streamlit dashboard → Metrics and charts: renders metrics
dashboard/dashboard.py - Dashboard user → Streamlit dashboard: views
README.md - Root launcher → Streamlit dashboard: runs app
dashboard.py