# ansu-john/regression-models architecture

> Architecture diagram of the GitHub repository ansu-john/regression-models, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ansu-john/regression-models
- Repository: https://github.com/ansu-john/regression-models

## Overview

##### Project type and purpose
- This is a data-science / machine-learning analytics project, organized as Jupyter Notebook experiments.

##### File structure
- Top-level items:
– Six notebooks, each implementing one regression technique.
– A `resources/` folder containing CSV datasets.
- No backend/server or frontend web app – everything runs in a Notebook environment.
- External dependencies implied: Python interpreter, scikit-learn, pandas, matplotlib/seaborn.

##### Main components
a. Data Sources
– `Ecommerce Customers.csv`
– `Social_Network_Ads.csv`
– `mushrooms.csv`
b. Notebook Environment
– Jupyter server / kernel
c. Data Processing & Feature Engineering
– pandas-based loading, cleaning, transforming
d. Modeling Components (one per notebook)
– Linear Regression
– Logistic Regression
– Polynomial Regression
– Decision Tree Regression
– Random Forest Regression
– Support Vector Regression
e. Machine-Learning Framework
– scikit-learn library
f. Visualization & Evaluation
– matplotlib / seaborn plots
– metrics computation (MAE, RMSE, R²)

##### Relationships and data flow
- Data Processing → Modeling Components
- Modeling Components ↔ scikit-learn (calls to fit(), predict())
- Modeling Components → Visualization & Evaluation
- All notebooks run inside the Jupyter Environment

##### Architectural patterns / design principles
- Modular separation by technique: each notebook is a self-contained “experiment module.”
- Reusable data-loading and evaluation “sub-pipeline.”
- Clear distinction between data ingestion, model training, and result rendering.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Data Sources
    DS1[(“Ecommerce Customers.csv”)]:::data
    DS2[(“Social_Network_Ads.csv”)]:::data
    DS3[(“mushrooms.csv”)]:::data

    %% Jupyter Environment
    subgraph "Jupyter Notebook Environment"
        preprocessing["Data Ingestion & Preprocessing"]:::processing
        LR("Notebook: Linear Regression"):::processing
        LG("Notebook: Logistic Regression"):::processing
        PR("Notebook: Polynomial Regression"):::processing
        DT("Notebook: Decision Tree Regression"):::processing
        RF("Notebook: Random Forest Regression"):::processing
        SVR("Notebook: Support Vector Regression"):::processing
        sklearn["scikit-learn"]:::ml
        evaluation["Visualization & Evaluation\nMAE, RMSE, R²"]:::viz
    end

    %% Data flow
    DS1 -->|"read_data()"| preprocessing
    DS2 -->|"read_data()"| preprocessing
    DS3 -->|"read_data()"| preprocessing

    preprocessing -->|prepared_data| LR
    preprocessing -->|prepared_data| LG
    preprocessing -->|prepared_data| PR
    preprocessing -->|prepared_data| DT
    preprocessing -->|prepared_data| RF
    preprocessing -->|prepared_data| SVR

    LR -->|"fit()/predict()"| sklearn
    LG -->|"fit()/predict()"| sklearn
    PR -->|"fit()/predict()"| sklearn
    DT -->|"fit()/predict()"| sklearn
    RF -->|"fit()/predict()"| sklearn
    SVR -->|"fit()/predict()"| sklearn

    LR -->|"results"| evaluation
    LG -->|"results"| evaluation
    PR -->|"results"| evaluation
    DT -->|"results"| evaluation
    RF -->|"results"| evaluation
    SVR -->|"results"| evaluation

    %% Click events
    click DS1 "https://github.com/ansu-john/regression-models/blob/main/resources/Ecommerce Customers.csv"
    click DS2 "https://github.com/ansu-john/regression-models/blob/main/resources/Social_Network_Ads.csv"
    click DS3 "https://github.com/ansu-john/regression-models/blob/main/resources/mushrooms.csv"
    click LR "https://github.com/ansu-john/regression-models/blob/main/Linear Regression Model.ipynb"
    click LG "https://github.com/ansu-john/regression-models/blob/main/Logistic Regression Model.ipynb"
    click PR "https://github.com/ansu-john/regression-models/blob/main/Polynomial Regression Model.ipynb"
    click DT "https://github.com/ansu-john/regression-models/blob/main/Decision Tree Regression.ipynb"
    click RF "https://github.com/ansu-john/regression-models/blob/main/Random Forest Regression.ipynb"
    click SVR "https://github.com/ansu-john/regression-models/blob/main/Support Vector Regression.ipynb"

    %% Styles
    classDef data fill:#cce5ff,stroke:#004085;
    classDef processing fill:#d4edda,stroke:#155724;
    classDef ml fill:#fff3cd,stroke:#856404;
    classDef viz fill:#e2e3f3,stroke:#6f42c1;
```
