# narukavya/student-performance-regression architecture

> Architecture diagram of the GitHub repository narukavya/student-performance-regression, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/narukavya/student-performance-regression
- Repository: https://github.com/narukavya/student-performance-regression

## Overview

This repository predicts students’ final grades from prior grades and study-related features. Its workflow is: a user enters inputs in the Gradio app, which loads the saved regression model and returns a prediction. Separate scripts inspect the dataset, explore model predictions visually, and train/evaluate and save the model. The README is empty; relationships shown here are supported by the sampled scripts, not by documentation.

Main entry points: [`app.py`](https://github.com/narukavya/student-performance-regression/blob/main/app.py) (Gradio prediction interface), [`data/student-mat.csv`](https://github.com/narukavya/student-performance-regression/blob/main/data/student-mat.csv) (Student dataset), [`eda.py`](https://github.com/narukavya/student-performance-regression/blob/main/eda.py) (Prediction visualization), [`linear_regression.py`](https://github.com/narukavya/student-performance-regression/blob/main/linear_regression.py) (Regression training and evaluation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_exploration["Data exploration"]
  node_dataset["Student dataset<br/>[student-mat.csv]"]
  node_data_checks["Dataset checks<br/>[train.py]"]
  node_eda["Prediction visualization<br/>[eda.py]"]
  node_plot["Actual vs predicted plot"]
end

subgraph group_training["Model training"]
  node_trainer["Regression training and evaluation"]
  node_model["Saved regression model<br/>[model.pkl]"]
end

subgraph group_serving["Prediction app"]
  node_app["Gradio prediction interface<br/>[app.py]"]
end

node_user(("User"))

node_data_checks -->|"reads"| node_dataset
node_eda -->|"reads"| node_dataset
node_trainer -->|"reads"| node_dataset
node_eda -->|"saves plot"| node_plot
node_trainer -->|"saves model"| node_model
node_user -->|"enters features"| node_app
node_app -->|"loads and predicts"| node_model
node_app -->|"displays grade"| node_user

click node_dataset "https://github.com/narukavya/student-performance-regression/blob/main/data/student-mat.csv"
click node_data_checks "https://github.com/narukavya/student-performance-regression/blob/main/train.py"
click node_eda "https://github.com/narukavya/student-performance-regression/blob/main/eda.py"
click node_plot "https://github.com/narukavya/student-performance-regression/tree/main/images"
click node_trainer "https://github.com/narukavya/student-performance-regression/blob/main/linear_regression.py"
click node_model "https://github.com/narukavya/student-performance-regression/blob/main/model.pkl"
click node_app "https://github.com/narukavya/student-performance-regression/blob/main/app.py"

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_dataset,node_data_checks,node_eda,node_plot,node_user toneBlue
class node_trainer,node_model toneAmber
class node_app toneMint
```

## Components

### Data exploration

- [Student dataset](https://github.com/narukavya/student-performance-regression/blob/main/data/student-mat.csv): `data/student-mat.csv`
- [Dataset checks](https://github.com/narukavya/student-performance-regression/blob/main/train.py): `train.py`
- [Prediction visualization](https://github.com/narukavya/student-performance-regression/blob/main/eda.py): `eda.py`
- [Actual vs predicted plot](https://github.com/narukavya/student-performance-regression/tree/main/images): `images`

### Model training

- [Regression training and evaluation](https://github.com/narukavya/student-performance-regression/blob/main/linear_regression.py): `linear_regression.py`
- [Saved regression model](https://github.com/narukavya/student-performance-regression/blob/main/model.pkl): `model.pkl`

### Prediction app

- [Gradio prediction interface](https://github.com/narukavya/student-performance-regression/blob/main/app.py): `app.py`

### Other components

- **User**

## Connections

- Dataset checks → Student dataset: reads (evidence: `train.py`)
- Prediction visualization → Student dataset: reads (evidence: `eda.py`)
- Regression training and evaluation → Student dataset: reads (evidence: `linear_regression.py`)
- Prediction visualization → Actual vs predicted plot: saves plot (evidence: `eda.py`)
- Regression training and evaluation → Saved regression model: saves model (evidence: `linear_regression.py`)
- User → Gradio prediction interface: enters features (evidence: `app.py`)
- Gradio prediction interface → Saved regression model: loads and predicts (evidence: `app.py`)
- Gradio prediction interface → User: displays grade (evidence: `app.py`)
