# navneet-nitin/student-performance-prediction-system architecture

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

- Interactive diagram: https://gitdiagram.com/navneet-nitin/student-performance-prediction-system
- Repository: https://github.com/navneet-nitin/student-performance-prediction-system

## Overview

This is a small Streamlit application that turns student lifestyle inputs into a bounded exam-score prediction. The principal workflow is input collection and schedule validation, categorical encoding and feature ordering, scaling, model inference, then score-range presentation. The README documents the broader dataset analysis and training workflow, but those files are absent from the supplied tree, so they are not represented as runtime components. Connections shown here are supported by app.py or explicit README statements.

Main entry points: [`app.py`](https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/app.py) (Habit inputs), [`feature_names.pkl`](https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/feature_names.pkl) (Feature names), [`scaler.pkl`](https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/scaler.pkl) (Fitted scaler), [`model.pkl`](https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/model.pkl) (Linear regression model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prediction["Prediction app"]
  node_input_ui["Habit inputs<br/>[app.py]"]
  node_schedule_validation["Schedule validation<br/>[app.py]"]
  node_category_mapping["Category mapping<br/>[app.py]"]
  node_feature_assembly["Feature assembly<br/>[app.py]"]
  node_scaling["Feature scaling<br/>[app.py]"]
  node_inference["Score inference<br/>[app.py]"]
  node_result_display["Score display<br/>[app.py]"]
end

subgraph group_artifacts["Model artifacts"]
  node_feature_names["Feature names<br/>[feature_names.pkl]"]
  node_scaler["Fitted scaler<br/>[scaler.pkl]"]
  node_model["Linear regression model<br/>[model.pkl]"]
end

node_student(("Student"))

node_student -->|"enters habits"| node_input_ui
node_input_ui -->|"checks hours"| node_schedule_validation
node_input_ui -->|"selects categories"| node_category_mapping
node_category_mapping -->|"encodes values"| node_feature_assembly
node_input_ui -->|"supplies values"| node_feature_assembly
node_feature_names -->|"orders columns"| node_feature_assembly
node_feature_assembly -->|"transforms inputs"| node_scaling
node_scaler -->|"scales features"| node_scaling
node_scaling -->|"passes scaled data"| node_inference
node_model -->|"predicts score"| node_inference
node_inference -->|"bounds and displays"| node_result_display
node_result_display -->|"shows prediction"| node_student

click node_input_ui "https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/app.py"
click node_schedule_validation "https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/app.py"
click node_category_mapping "https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/app.py"
click node_feature_assembly "https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/app.py"
click node_scaling "https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/app.py"
click node_inference "https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/app.py"
click node_result_display "https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/app.py"
click node_feature_names "https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/feature_names.pkl"
click node_scaler "https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/scaler.pkl"
click node_model "https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/model.pkl"

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_input_ui,node_schedule_validation,node_category_mapping,node_feature_assembly,node_scaling,node_inference,node_result_display toneBlue
class node_feature_names,node_scaler,node_model toneAmber
class node_student toneIndigo
```

## Components

### Prediction app

- [Habit inputs](https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/app.py): `app.py`
- [Schedule validation](https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/app.py): `app.py`
- [Category mapping](https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/app.py): `app.py`
- [Feature assembly](https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/app.py): `app.py`
- [Feature scaling](https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/app.py): `app.py`
- [Score inference](https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/app.py): `app.py`
- [Score display](https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/app.py): `app.py`

### Model artifacts

- [Feature names](https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/feature_names.pkl): `feature_names.pkl`
- [Fitted scaler](https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/scaler.pkl): `scaler.pkl`
- [Linear regression model](https://github.com/navneet-nitin/student-performance-prediction-system/blob/main/model.pkl): `model.pkl`

### Other components

- **Student**

## Connections

- Student → Habit inputs: enters habits (evidence: `app.py`)
- Habit inputs → Schedule validation: checks hours (evidence: `app.py`)
- Habit inputs → Category mapping: selects categories (evidence: `app.py`)
- Category mapping → Feature assembly: encodes values (evidence: `app.py`)
- Habit inputs → Feature assembly: supplies values (evidence: `app.py`)
- Feature names → Feature assembly: orders columns (evidence: `app.py`)
- Feature assembly → Feature scaling: transforms inputs (evidence: `app.py`)
- Fitted scaler → Feature scaling: scales features (evidence: `app.py`)
- Feature scaling → Score inference: passes scaled data (evidence: `app.py`)
- Linear regression model → Score inference: predicts score (evidence: `app.py`)
- Score inference → Score display: bounds and displays (evidence: `app.py`)
- Score display → Student: shows prediction (evidence: `app.py`)
