# ayushkumar418/student_performance_predictor architecture

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

- Interactive diagram: https://gitdiagram.com/ayushkumar418/student_performance_predictor
- Repository: https://github.com/ayushkumar418/student_performance_predictor

## Overview

This is a Streamlit student exam-score prediction product, with simple and advanced dashboard variants. The main workflow is student-entered factors → model prediction → score interpretation and personalized recommendations; the simple app also supports next-semester projections from student records. The advanced app adds confidence, feature-importance, dataset-analytics, and model-comparison views. Retraining and analysis are represented as separate supporting workflows. Some source excerpts are partial, so uncertain data paths and the listed prediction-history database are omitted.

Main entry points: [`app_advanced.py`](https://github.com/ayushkumar418/student_performance_predictor/blob/main/app_advanced.py) (Advanced dashboard), [`train_advanced.py`](https://github.com/ayushkumar418/student_performance_predictor/blob/main/train_advanced.py) (Training pipeline), [`model_analysis.py`](https://github.com/ayushkumar418/student_performance_predictor/blob/main/model_analysis.py) (Dataset analysis), [`StudentPerformanceFactors.csv`](https://github.com/ayushkumar418/student_performance_predictor/blob/main/StudentPerformanceFactors.csv) (Performance dataset)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboards["Prediction dashboards"]
  node_simple_app["Simple dashboard<br/>[app.py]"]
  node_advanced_app["Advanced dashboard<br/>[app_advanced.py]"]
end

subgraph group_ml["Model lifecycle"]
  node_model["Selected model"]
  node_all_models["Model collection"]
  node_training["Training pipeline<br/>[train_advanced.py]"]
  node_results["Model metrics<br/>[model_results.json]"]
end

subgraph group_insights["Analytics and insights"]
  node_importance["Feature rankings"]
  node_residuals["Residual statistics<br/>[residuals.json]"]
  node_analysis["Dataset analysis<br/>[model_analysis.py]"]
  node_summary["Analysis summary"]
end

subgraph group_data["Student data"]
  node_dataset["Performance dataset"]
end

node_user(("Student or educator"))

node_user -->|"enters factors"| node_simple_app
node_user -->|"enters factors"| node_advanced_app
node_simple_app -->|"loads and predicts"| node_model
node_advanced_app -->|"loads and predicts"| node_model
node_simple_app -->|"reads records"| node_dataset
node_advanced_app -->|"reads for analytics"| node_dataset
node_training -->|"loads and processes"| node_dataset
node_training -->|"saves best model"| node_model
node_training -->|"saves models"| node_all_models
node_training -->|"writes metrics"| node_results
node_training -->|"writes rankings"| node_importance
node_training -->|"writes residuals"| node_residuals
node_advanced_app -->|"loads for comparison"| node_all_models
node_advanced_app -->|"reads comparison metrics"| node_results
node_advanced_app -->|"reads feature rankings"| node_importance
node_advanced_app -->|"reads confidence data"| node_residuals
node_analysis -->|"analyzes records"| node_dataset
node_analysis -->|"loads models"| node_all_models
node_analysis -->|"loads selected model"| node_model
node_analysis -->|"writes findings"| node_summary
node_advanced_app -->|"reads analysis"| node_summary

click node_simple_app "https://github.com/ayushkumar418/student_performance_predictor/blob/main/app.py"
click node_advanced_app "https://github.com/ayushkumar418/student_performance_predictor/blob/main/app_advanced.py"
click node_training "https://github.com/ayushkumar418/student_performance_predictor/blob/main/train_advanced.py"
click node_dataset "https://github.com/ayushkumar418/student_performance_predictor/blob/main/StudentPerformanceFactors.csv"
click node_results "https://github.com/ayushkumar418/student_performance_predictor/blob/main/model_results.json"
click node_importance "https://github.com/ayushkumar418/student_performance_predictor/blob/main/feature_importance.json"
click node_residuals "https://github.com/ayushkumar418/student_performance_predictor/blob/main/residuals.json"
click node_analysis "https://github.com/ayushkumar418/student_performance_predictor/blob/main/model_analysis.py"
click node_summary "https://github.com/ayushkumar418/student_performance_predictor/blob/main/analysis_summary.json"

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_simple_app,node_advanced_app toneBlue
class node_model,node_all_models,node_training,node_results toneAmber
class node_importance,node_residuals,node_analysis,node_summary toneMint
class node_dataset toneRose
class node_user toneIndigo
```

## Components

### Prediction dashboards

- [Simple dashboard](https://github.com/ayushkumar418/student_performance_predictor/blob/main/app.py): `app.py`
- [Advanced dashboard](https://github.com/ayushkumar418/student_performance_predictor/blob/main/app_advanced.py): `app_advanced.py`

### Model lifecycle

- **Selected model**
- **Model collection**
- [Training pipeline](https://github.com/ayushkumar418/student_performance_predictor/blob/main/train_advanced.py): `train_advanced.py`
- [Model metrics](https://github.com/ayushkumar418/student_performance_predictor/blob/main/model_results.json): `model_results.json`

### Analytics and insights

- [Feature rankings](https://github.com/ayushkumar418/student_performance_predictor/blob/main/feature_importance.json): `feature_importance.json`
- [Residual statistics](https://github.com/ayushkumar418/student_performance_predictor/blob/main/residuals.json): `residuals.json`
- [Dataset analysis](https://github.com/ayushkumar418/student_performance_predictor/blob/main/model_analysis.py): `model_analysis.py`
- [Analysis summary](https://github.com/ayushkumar418/student_performance_predictor/blob/main/analysis_summary.json): `analysis_summary.json`

### Student data

- [Performance dataset](https://github.com/ayushkumar418/student_performance_predictor/blob/main/StudentPerformanceFactors.csv): `StudentPerformanceFactors.csv`

### Other components

- **Student or educator**

## Connections

- Student or educator → Simple dashboard: enters factors
- Student or educator → Advanced dashboard: enters factors
- Simple dashboard → Selected model: loads and predicts
- Advanced dashboard → Selected model: loads and predicts
- Simple dashboard → Performance dataset: reads records
- Advanced dashboard → Performance dataset: reads for analytics
- Training pipeline → Performance dataset: loads and processes
- Training pipeline → Selected model: saves best model
- Training pipeline → Model collection: saves models
- Training pipeline → Model metrics: writes metrics
- Training pipeline → Feature rankings: writes rankings
- Training pipeline → Residual statistics: writes residuals
- Advanced dashboard → Model collection: loads for comparison
- Advanced dashboard → Model metrics: reads comparison metrics
- Advanced dashboard → Feature rankings: reads feature rankings
- Advanced dashboard → Residual statistics: reads confidence data
- Dataset analysis → Performance dataset: analyzes records
- Dataset analysis → Model collection: loads models
- Dataset analysis → Selected model: loads selected model
- Dataset analysis → Analysis summary: writes findings
- Advanced dashboard → Analysis summary: reads analysis
