How codeplaydeepak/customer_churn_prediction works
This is a customer-churn analytics product with a React dashboard and a separate Python training/prediction application. Users explore customer data, inspect engineered features and model performance, then assess individual or batch churn risk and business implications. The Python workflow loads or generates data, engineers features, preprocesses them, trains candidate models, and evaluates results. The dashboard also presents explainability, research, and model-comparison capabilities. Some frontend-to-engine and Python pipeline links are only indicated by module references, so those edges are marked unverified rather than asserted as direct calls.
Main entry points: App.tsx Dashboard app · mlEngine.ts Risk engine · streamlit_app.py Streamlit and CLI · train.py Model training
Components 28
Dashboard workflow
- Dashboard app
src/App.tsx - Dataset view
src/components/DatasetView.tsx - Data quality
src/components/DataQualityView.tsx - Data exploration
src/components/EDAView.tsx - Feature engineering view
src/components/FeatureEngineeringView.tsx - Training view
src/components/ModelTrainingView.tsx - Model comparison
src/components/ModelComparisonView.tsx - Evaluation view
src/components/EvaluationView.tsx - Prediction view
src/components/PredictionView.tsx - Batch prediction
src/components/BatchPredictionView.tsx - Summary dashboard
src/components/DashboardView.tsx - Risk engine
src/mlEngine.ts
Analysis and insights
- Baseline data
src/data/baselineData.ts - Explainability view
src/components/ExplainabilityView.tsx - Risk analysis view
src/components/RiskAnalysisView.tsx - Business insights
src/components/BusinessInsightsView.tsx - Research view
src/components/ResearchView.tsx
Python ML pipeline
- Data loading
customer-churn-prediction/src/data_loader.py - Feature engineering
customer-churn-prediction/src/feature_engineering.py - Preprocessing
customer-churn-prediction/src/preprocessing.py - Model training
customer-churn-prediction/src/train.py - Model evaluation
customer-churn-prediction/src/evaluation.py - Prediction service
customer-churn-prediction/src/prediction.py - Model explainability
customer-churn-prediction/src/explainability.py - Risk analysis
customer-churn-prediction/src/risk_analysis.py - Model artifacts
customer-churn-prediction/models
Python application
- Streamlit and CLI
customer-churn-prediction/streamlit_app.py
Other components
- Analyst
Connections 37
- Analyst → Dashboard app: uses
README.md - Dashboard app → Dataset view: renders
src/App.tsx - Dashboard app → Data quality: renders
src/App.tsx - Dashboard app → Data exploration: renders
src/App.tsx - Dashboard app → Feature engineering view: renders
src/App.tsx - Dashboard app → Training view: renders
src/App.tsx - Dashboard app → Model comparison: renders
src/App.tsx - Dashboard app → Evaluation view: renders
src/App.tsx - Dashboard app → Prediction view: renders
src/App.tsx - Dashboard app → Batch prediction: renders
src/App.tsx - Dashboard app → Summary dashboard: renders
src/App.tsx - Dashboard app → Explainability view: renders
src/App.tsx - Dashboard app → Risk analysis view: renders
src/App.tsx - Dashboard app → Business insights: renders
src/App.tsx - Dashboard app → Research view: renders
src/App.tsx - Dashboard app → Baseline data: loads
src/App.tsx - Feature engineering view → Risk engine: calculates with
src/components/FeatureEngineeringView.tsx - Dataset view → Risk engine: uses
src/components/DatasetView.tsx - Data quality → Risk engine: uses
src/components/DataQualityView.tsx - Summary dashboard → Risk engine: uses
src/components/DashboardView.tsx - Prediction view → Risk engine: uses
src/components/PredictionView.tsx - Batch prediction → Risk engine: uses
src/components/BatchPredictionView.tsx - Risk analysis view → Risk engine: uses
src/components/RiskAnalysisView.tsx - Explainability view → Risk engine: uses
src/components/ExplainabilityView.tsx - Streamlit and CLI → Data loading: loads data
customer-churn-prediction/streamlit_app.py - Streamlit and CLI → Feature engineering: engineers features
customer-churn-prediction/streamlit_app.py - Streamlit and CLI → Prediction service: requests predictions
customer-churn-prediction/streamlit_app.py - Streamlit and CLI → Model training: starts training
customer-churn-prediction/streamlit_app.py - Streamlit and CLI → Model evaluation: evaluates model
customer-churn-prediction/streamlit_app.py - Model training → Data loading: generates data
customer-churn-prediction/src/train.py - Model training → Feature engineering: engineers features
customer-churn-prediction/src/train.py - Model training → Preprocessing: builds pipeline
customer-churn-prediction/src/train.py - Model training → Model evaluation: scores models
customer-churn-prediction/src/train.py - Model training → Model artifacts: saves models
customer-churn-prediction/src/train.py - Prediction service → Feature engineering: engineers features
customer-churn-prediction/src/prediction.py - Streamlit and CLI → Model artifacts: uses models
- Model explainability → Preprocessing: uses
customer-churn-prediction/src/explainability.py