# trishanshv/churnpredictor architecture

> Architecture diagram of the GitHub repository trishanshv/churnpredictor, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/trishanshv/churnpredictor
- Repository: https://github.com/trishanshv/churnpredictor

## Overview

This repository is a notebook-centered customer churn analysis project. Its documented workflow runs from local Telco CSV ingestion through cleaning, exploratory analysis, feature preparation, model training, evaluation, and business interpretation; model artifacts may be saved for later use. The tree contains the notebook but no implementation modules or stored data/model files, so the pipeline links below reflect the README rather than inspected notebook code. Streamlit is documented only as an optional demo capability.

Main entry points: [`notebooks/churn_analysis.ipynb`](https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb) (Train-Test Split), [`data`](https://github.com/trishanshv/churnpredictor/tree/main/data) (Local CSV Files), [`models`](https://github.com/trishanshv/churnpredictor/tree/main/models) (Saved Model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data and Analysis"]
  node_files[("Local CSV Files")]
  node_ingest["Data Ingestion"]
  node_clean["Data Cleaning"]
  node_eda["Exploratory Analysis"]
  node_features["Feature Preparation"]
end

subgraph group_ml["Modeling and Evaluation"]
  node_imbalance["Class Imbalance"]
  node_split["Train-Test Split"]
  node_logistic["Logistic Regression"]
  node_forest["Random Forest"]
  node_xgboost["XGBoost"]
  node_evaluation["Model Evaluation"]
  node_selection["Model Comparison"]
end

subgraph group_outcomes["Insights and Delivery"]
  node_insights["Business Insights"]
  node_artifact["Saved Model"]
  node_ui["Prediction UI"]
end

node_dataset["Telco CSV"]
node_retention(("Retention Team"))

node_dataset -->|"stored as"| node_files
node_files -->|"read by"| node_ingest
node_ingest -->|"feeds"| node_clean
node_clean -->|"explored in"| node_eda
node_eda -->|"informs"| node_features
node_features -->|"prepared for"| node_imbalance
node_imbalance -->|"feeds"| node_split
node_split -->|"trains"| node_logistic
node_split -->|"trains"| node_forest
node_split -->|"trains"| node_xgboost
node_logistic -->|"evaluated by"| node_evaluation
node_forest -->|"evaluated by"| node_evaluation
node_xgboost -->|"evaluated by"| node_evaluation
node_evaluation -->|"compared in"| node_selection
node_selection -->|"interpreted for"| node_insights
node_selection -->|"exports"| node_artifact
node_artifact -.->|"loads optionally"| node_ui
node_insights -->|"guides action"| node_retention

click node_files "https://github.com/trishanshv/churnpredictor/tree/main/data"
click node_ingest "https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb"
click node_clean "https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb"
click node_eda "https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb"
click node_features "https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb"
click node_imbalance "https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb"
click node_split "https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb"
click node_logistic "https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb"
click node_forest "https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb"
click node_xgboost "https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb"
click node_evaluation "https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb"
click node_selection "https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb"
click node_insights "https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb"
click node_artifact "https://github.com/trishanshv/churnpredictor/tree/main/models"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_files,node_ingest,node_clean,node_eda,node_features toneBlue
class node_imbalance,node_split,node_logistic,node_forest,node_xgboost,node_evaluation,node_selection toneAmber
class node_insights,node_artifact,node_ui toneMint
class node_dataset,node_retention toneIndigo
```

## Components

### Data and Analysis

- [Local CSV Files](https://github.com/trishanshv/churnpredictor/tree/main/data): `data`
- [Data Ingestion](https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb): `notebooks/churn_analysis.ipynb`
- [Data Cleaning](https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb): `notebooks/churn_analysis.ipynb`
- [Exploratory Analysis](https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb): `notebooks/churn_analysis.ipynb`
- [Feature Preparation](https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb): `notebooks/churn_analysis.ipynb`

### Modeling and Evaluation

- [Class Imbalance](https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb): `notebooks/churn_analysis.ipynb`
- [Train-Test Split](https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb): `notebooks/churn_analysis.ipynb`
- [Logistic Regression](https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb): `notebooks/churn_analysis.ipynb`
- [Random Forest](https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb): `notebooks/churn_analysis.ipynb`
- [XGBoost](https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb): `notebooks/churn_analysis.ipynb`
- [Model Evaluation](https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb): `notebooks/churn_analysis.ipynb`
- [Model Comparison](https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb): `notebooks/churn_analysis.ipynb`

### Insights and Delivery

- [Business Insights](https://github.com/trishanshv/churnpredictor/blob/main/notebooks/churn_analysis.ipynb): `notebooks/churn_analysis.ipynb`
- [Saved Model](https://github.com/trishanshv/churnpredictor/tree/main/models): `models`
- **Prediction UI**

### Other components

- **Telco CSV**
- **Retention Team**

## Connections

- Telco CSV → Local CSV Files: stored as (evidence: `README.md`)
- Local CSV Files → Data Ingestion: read by (evidence: `README.md`)
- Data Ingestion → Data Cleaning: feeds (evidence: `README.md`)
- Data Cleaning → Exploratory Analysis: explored in (evidence: `README.md`)
- Exploratory Analysis → Feature Preparation: informs (evidence: `README.md`)
- Feature Preparation → Class Imbalance: prepared for (evidence: `README.md`)
- Class Imbalance → Train-Test Split: feeds (evidence: `README.md`)
- Train-Test Split → Logistic Regression: trains (evidence: `README.md`)
- Train-Test Split → Random Forest: trains (evidence: `README.md`)
- Train-Test Split → XGBoost: trains (evidence: `README.md`)
- Logistic Regression → Model Evaluation: evaluated by (evidence: `README.md`)
- Random Forest → Model Evaluation: evaluated by (evidence: `README.md`)
- XGBoost → Model Evaluation: evaluated by (evidence: `README.md`)
- Model Evaluation → Model Comparison: compared in (evidence: `README.md`)
- Model Comparison → Business Insights: interpreted for (evidence: `README.md`)
- Model Comparison → Saved Model: exports (evidence: `README.md`)
- Saved Model → Prediction UI: loads optionally (evidence: `README.md`)
- Business Insights → Retention Team: guides action (evidence: `README.md`)
