# adeebmoiz101/ml-project architecture

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

- Interactive diagram: https://gitdiagram.com/adeebmoiz101/ml-project
- Repository: https://github.com/adeebmoiz101/ml-project

## Overview

This is a student exam performance prediction application. Its main user workflow collects background details and reading/writing scores, transforms the submitted features with the saved preprocessor, predicts a maths score, and displays it. Separately, the training workflow ingests the student dataset, splits it, fits preprocessing, compares regressors, and saves model artifacts. The README also describes exploratory analysis and notebook-based model comparison. The graph follows sampled calls and documented capabilities; notebook internals and some artifact wiring are not shown in the sampled source.

Main entry points: [`app.py`](https://github.com/adeebmoiz101/ml-project/blob/main/app.py) (Flask routes), [`src/pipeline/predict_pipeline.py`](https://github.com/adeebmoiz101/ml-project/blob/main/src/pipeline/predict_pipeline.py) (Prediction pipeline), [`artifacts`](https://github.com/adeebmoiz101/ml-project/tree/main/artifacts) (Saved data and models), [`src/components/data_ingestion.py`](https://github.com/adeebmoiz101/ml-project/blob/main/src/components/data_ingestion.py) (Data ingestion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Prediction web app"]
  node_app["Flask routes<br/>[app.py]"]
  node_templates["Web templates"]
  node_custom_data["Input dataframe"]
  node_predict["Prediction pipeline"]
end

subgraph group_training["Model training"]
  node_ingestion["Data ingestion<br/>[data_ingestion.py]"]
  node_transformation["Data transformation"]
  node_trainer["Model trainer<br/>[model_trainer.py]"]
  node_utils["Model utilities<br/>[utils.py]"]
end

subgraph group_analysis["Exploration and comparison"]
  node_eda["Exploratory analysis"]
  node_notebook_training["Notebook model comparison"]
end

subgraph group_persistence["Data and artifacts"]
  node_dataset["Student dataset<br/>[stud.csv]"]
  node_artifacts["Saved data and models"]
end

node_student(("Student / user"))

node_student -->|"submits inputs"| node_app
node_app -->|"renders pages"| node_templates
node_app -->|"builds dataframe"| node_custom_data
node_app -->|"invokes prediction"| node_predict
node_predict -->|"receives features"| node_custom_data
node_predict -->|"loads model and preprocessor"| node_artifacts
node_predict -->|"returns score for display"| node_templates
node_ingestion -->|"reads"| node_dataset
node_ingestion -->|"writes raw and split data"| node_artifacts
node_ingestion -->|"calls"| node_transformation
node_transformation -->|"writes preprocessor"| node_artifacts
node_transformation -->|"calls"| node_trainer
node_trainer -->|"evaluates and saves model"| node_utils
node_utils -->|"writes model"| node_artifacts
node_dataset -.->|"documents dataset use"| node_eda
node_dataset -.->|"documents dataset use"| node_notebook_training

click node_app "https://github.com/adeebmoiz101/ml-project/blob/main/app.py"
click node_templates "https://github.com/adeebmoiz101/ml-project/tree/main/templates"
click node_custom_data "https://github.com/adeebmoiz101/ml-project/blob/main/src/pipeline/predict_pipeline.py"
click node_predict "https://github.com/adeebmoiz101/ml-project/blob/main/src/pipeline/predict_pipeline.py"
click node_ingestion "https://github.com/adeebmoiz101/ml-project/blob/main/src/components/data_ingestion.py"
click node_transformation "https://github.com/adeebmoiz101/ml-project/blob/main/src/components/data_transformation.py"
click node_trainer "https://github.com/adeebmoiz101/ml-project/blob/main/src/components/model_trainer.py"
click node_utils "https://github.com/adeebmoiz101/ml-project/blob/main/src/utils.py"
click node_eda "https://github.com/adeebmoiz101/ml-project/blob/main/notebook/1%20.%20EDA%20STUDENT%20PERFORMANCE%20.ipynb"
click node_notebook_training "https://github.com/adeebmoiz101/ml-project/blob/main/notebook/2.%20MODEL%20TRAINING.ipynb"
click node_dataset "https://github.com/adeebmoiz101/ml-project/blob/main/notebook/data/stud.csv"
click node_artifacts "https://github.com/adeebmoiz101/ml-project/tree/main/artifacts"

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_app,node_templates,node_custom_data,node_predict,node_student toneBlue
class node_ingestion,node_transformation,node_trainer,node_utils toneAmber
class node_eda,node_notebook_training toneMint
class node_dataset,node_artifacts toneRose
```

## Components

### Prediction web app

- [Flask routes](https://github.com/adeebmoiz101/ml-project/blob/main/app.py): `app.py`
- [Web templates](https://github.com/adeebmoiz101/ml-project/tree/main/templates): `templates`
- [Input dataframe](https://github.com/adeebmoiz101/ml-project/blob/main/src/pipeline/predict_pipeline.py): `src/pipeline/predict_pipeline.py`
- [Prediction pipeline](https://github.com/adeebmoiz101/ml-project/blob/main/src/pipeline/predict_pipeline.py): `src/pipeline/predict_pipeline.py`

### Model training

- [Data ingestion](https://github.com/adeebmoiz101/ml-project/blob/main/src/components/data_ingestion.py): `src/components/data_ingestion.py`
- [Data transformation](https://github.com/adeebmoiz101/ml-project/blob/main/src/components/data_transformation.py): `src/components/data_transformation.py`
- [Model trainer](https://github.com/adeebmoiz101/ml-project/blob/main/src/components/model_trainer.py): `src/components/model_trainer.py`
- [Model utilities](https://github.com/adeebmoiz101/ml-project/blob/main/src/utils.py): `src/utils.py`

### Exploration and comparison

- [Exploratory analysis](https://github.com/adeebmoiz101/ml-project/blob/main/notebook/1%20.%20EDA%20STUDENT%20PERFORMANCE%20.ipynb): `notebook/1 . EDA STUDENT PERFORMANCE .ipynb`
- [Notebook model comparison](https://github.com/adeebmoiz101/ml-project/blob/main/notebook/2.%20MODEL%20TRAINING.ipynb): `notebook/2. MODEL TRAINING.ipynb`

### Data and artifacts

- [Student dataset](https://github.com/adeebmoiz101/ml-project/blob/main/notebook/data/stud.csv): `notebook/data/stud.csv`
- [Saved data and models](https://github.com/adeebmoiz101/ml-project/tree/main/artifacts): `artifacts`

### Other components

- **Student / user**

## Connections

- Student / user → Flask routes: submits inputs
- Flask routes → Web templates: renders pages
- Flask routes → Input dataframe: builds dataframe
- Flask routes → Prediction pipeline: invokes prediction
- Prediction pipeline → Input dataframe: receives features
- Prediction pipeline → Saved data and models: loads model and preprocessor
- Prediction pipeline → Web templates: returns score for display
- Data ingestion → Student dataset: reads
- Data ingestion → Saved data and models: writes raw and split data
- Data ingestion → Data transformation: calls
- Data transformation → Saved data and models: writes preprocessor
- Data transformation → Model trainer: calls
- Model trainer → Model utilities: evaluates and saves model
- Model utilities → Saved data and models: writes model
- Student dataset → Exploratory analysis: documents dataset use
- Student dataset → Notebook model comparison: documents dataset use
