# ibtesaamaslam/customer-churn-prediction-model architecture

> Architecture diagram of the GitHub repository ibtesaamaslam/customer-churn-prediction-model, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ibtesaamaslam/customer-churn-prediction-model
- Repository: https://github.com/ibtesaamaslam/customer-churn-prediction-model

## Overview

##### Main Components
a. Data Source
- Customer-Churn.csv (raw tabular data)
b. Data Ingestion & Preprocessing
- Notebook cells that load CSV with Pandas
- Missing‐value handling, categorical encoding, feature scaling
c. Model Definition & Training
- ANN layers built in TensorFlow/Keras
- Hyperparameter tuning routines (GridSearch/RandomSearch from scikit-learn wrapper)
d. Evaluation & Reporting
- Metrics computation (accuracy, precision, recall, F1‐score, confusion matrix)
- Visualizations with Matplotlib/Seaborn
e. Execution Environment
- Jupyter Notebook (Churn Prediction Model.ipynb)
- Python runtime with dependencies

##### Relationships & Data Flow
1. The CSV file feeds into the Preprocessing component.
2. The preprocessed feature matrix flows into the Model Definition & Training component.
3. Trained model outputs predictions which feed into the Evaluation & Reporting component.
4. Optional loop: Hyperparameter Tuning sub‐component uses evaluation metrics to adjust model parameters and loops back into training.

##### Architectural Patterns & Design Principles
- Linear data‐flow pipeline (ETL → Train → Evaluate).
- Modular separation: clearly distinct stages (preprocessing, modeling, evaluation).
- Reproducibility: encapsulated in a single Jupyter Notebook.

##### Relevant Technologies & Libraries
- Pandas / NumPy (data ingestion & manipulation)
- Scikit‐learn (preprocessing helpers, train/test split, hyperparameter search)
- TensorFlow / Keras (ANN definition & training)
- Matplotlib / Seaborn (visualization)
- Jupyter Notebook (interactive orchestration)

## Diagram (Mermaid)

```mermaid
flowchart TD
    DataSource["Customer-Churn.csv"]:::data
    Preprocessing["Data Ingestion & Preprocessing"]:::process
    Training["Model Definition & Training"]:::process
    Evaluation["Evaluation & Visualization"]:::viz
    Tuning["Hyperparameter Tuning"]:::process
    Environment["Execution Environment & Documentation"]:::docs

    DataSource -->|"load CSV"| Preprocessing
    Preprocessing -->|"feature scaling\nmissing-value handling\nencoding"| Training
    Training -->|"predictions"| Evaluation
    Evaluation -->|"metrics computation"| Tuning
    Tuning -->|"tuned parameters"| Training

    %% Documentation
    Environment

    click DataSource "https://github.com/ibtesaamaslam/customer-churn-prediction-model/blob/main/Customer-Churn.csv"
    click Preprocessing "https://github.com/ibtesaamaslam/customer-churn-prediction-model/blob/main/Churn Prediction Model.ipynb"
    click Training "https://github.com/ibtesaamaslam/customer-churn-prediction-model/blob/main/Churn Prediction Model.ipynb"
    click Tuning "https://github.com/ibtesaamaslam/customer-churn-prediction-model/blob/main/Churn Prediction Model.ipynb"
    click Evaluation "https://github.com/ibtesaamaslam/customer-churn-prediction-model/blob/main/Churn Prediction Model.ipynb"
    click Environment "https://github.com/ibtesaamaslam/customer-churn-prediction-model/blob/main/README.md"

    classDef data fill:#9f6,stroke:#333,stroke-width:1px
    classDef process fill:#6cf,stroke:#333,stroke-width:1px
    classDef viz fill:#f96,stroke:#333,stroke-width:1px
    classDef docs fill:#ccc,stroke:#333,stroke-width:1px
```
