# diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico architecture

> Architecture diagram of the GitHub repository diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico
- Repository: https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico

## Overview

This repository is an academic-performance prediction and early-warning system. Its user workflow is to enter student characteristics in the Streamlit dashboard, submit them to the API, preprocess them for the trained regression and risk-classification models, and display grades, risk alerts, and intervention guidance. Separate product branches present model metrics and support offline data preparation and model training. The index and excerpts substantiate the API, prediction, preprocessing, training, and dashboard links; README-described analysis and recommendation capabilities are included where their precise implementation links are not shown.

Main entry points: [`src/data_prep.py`](https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/src/data_prep.py) (Student preprocessing), [`api/predict.py`](https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/api/predict.py) (Inference service), [`models`](https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/tree/main/models) (Trained models and preprocessing artifacts), [`app/Home.py`](https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/app/Home.py) (Dashboard home)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["User dashboard"]
  node_home["Dashboard home<br/>[Home.py]"]
  node_prediction_ui["Student assessment<br/>[1_Prediccion.py]"]
  node_metrics_ui["Model metrics<br/>[2_Metricas.py]"]
end

subgraph group_inference["Prediction service"]
  node_predictor["Inference service<br/>[predict.py]"]
  node_artifacts[("Trained models and preprocessing artifacts")]
end

subgraph group_modeling["Data and modeling"]
  node_prep["Student preprocessing<br/>[data_prep.py]"]
  node_config["Paths and parameters<br/>[config.py]"]
  node_grade_model["Grade regression ANN<br/>[model1.py]"]
  node_risk_model["Risk classification ANN<br/>[model2.py]"]
  node_training_base["Training and evaluation base<br/>[utils.py]"]
  node_datasets["Student datasets"]
  node_processed_data["Processed train/test data"]
end

subgraph group_operations["API contract"]
  node_api["REST endpoints<br/>[main.py]"]
  node_schemas["Request/response validation<br/>[schemas.py]"]
end

node_educator(("Educator"))
node_educational_staff(("Education staff"))

node_educator -->|"opens dashboard"| node_home
node_home -->|"navigates to"| node_prediction_ui
node_home -->|"opens metrics"| node_metrics_ui
node_prediction_ui -->|"posts student data"| node_api
node_api -->|"validates payloads"| node_schemas
node_api -->|"dispatches prediction"| node_predictor
node_predictor -->|"prepares student"| node_prep
node_predictor -->|"loads models"| node_artifacts
node_prep -->|"uses data paths"| node_config
node_predictor -->|"resolves model paths"| node_config
node_datasets -.->|"provides source data"| node_prep
node_prep -->|"writes splits"| node_processed_data
node_prep -->|"saves scaler and columns"| node_artifacts
node_training_base -->|"uses random seed"| node_config
node_grade_model -->|"inherits training"| node_training_base
node_risk_model -->|"inherits training"| node_training_base
node_processed_data -.->|"trains regression"| node_grade_model
node_processed_data -.->|"trains classifier"| node_risk_model
node_grade_model -.->|"saves trained model"| node_artifacts
node_risk_model -.->|"saves trained model"| node_artifacts
node_educational_staff -->|"enters student profile"| node_prediction_ui
node_educational_staff -->|"reviews performance"| node_metrics_ui

click node_home "https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/app/Home.py"
click node_prediction_ui "https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/app/pages/1_Prediccion.py"
click node_metrics_ui "https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/app/pages/2_Metricas.py"
click node_api "https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/api/main.py"
click node_schemas "https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/api/schemas.py"
click node_predictor "https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/api/predict.py"
click node_prep "https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/src/data_prep.py"
click node_config "https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/src/config.py"
click node_grade_model "https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/src/train/model1.py"
click node_risk_model "https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/src/train/model2.py"
click node_training_base "https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/src/train/utils.py"
click node_datasets "https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/tree/main/data/raw"
click node_processed_data "https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/tree/main/data/processed"
click node_artifacts "https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/tree/main/models"

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_home,node_prediction_ui,node_metrics_ui toneBlue
class node_predictor,node_artifacts toneAmber
class node_prep,node_config,node_grade_model,node_risk_model,node_training_base,node_datasets,node_processed_data toneMint
class node_api,node_schemas toneRose
class node_educator,node_educational_staff toneIndigo
```

## Components

### User dashboard

- [Dashboard home](https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/app/Home.py): `app/Home.py`
- [Student assessment](https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/app/pages/1_Prediccion.py): `app/pages/1_Prediccion.py`
- [Model metrics](https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/app/pages/2_Metricas.py): `app/pages/2_Metricas.py`

### Prediction service

- [Inference service](https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/api/predict.py): `api/predict.py`
- [Trained models and preprocessing artifacts](https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/tree/main/models): `models`

### Data and modeling

- [Student preprocessing](https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/src/data_prep.py): `src/data_prep.py`
- [Paths and parameters](https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/src/config.py): `src/config.py`
- [Grade regression ANN](https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/src/train/model1.py): `src/train/model1.py`
- [Risk classification ANN](https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/src/train/model2.py): `src/train/model2.py`
- [Training and evaluation base](https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/src/train/utils.py): `src/train/utils.py`
- [Student datasets](https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/tree/main/data/raw): `data/raw`
- [Processed train/test data](https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/tree/main/data/processed): `data/processed`

### API contract

- [REST endpoints](https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/api/main.py): `api/main.py`
- [Request/response validation](https://github.com/diegomonterocrc/proyecto-1-sistema-de-prediccion-de-rendimiento-academico/blob/main/api/schemas.py): `api/schemas.py`

### Other components

- **Educator**
- **Education staff**

## Connections

- Educator → Dashboard home: opens dashboard (evidence: `README.md`)
- Dashboard home → Student assessment: navigates to (evidence: `app/Home.py`)
- Dashboard home → Model metrics: opens metrics (evidence: `README.md`)
- Student assessment → REST endpoints: posts student data (evidence: `app/pages/1_Prediccion.py`)
- REST endpoints → Request/response validation: validates payloads (evidence: `api/main.py`)
- REST endpoints → Inference service: dispatches prediction (evidence: `api/main.py`)
- Inference service → Student preprocessing: prepares student (evidence: `api/predict.py`)
- Inference service → Trained models and preprocessing artifacts: loads models (evidence: `api/predict.py`)
- Student preprocessing → Paths and parameters: uses data paths (evidence: `src/data_prep.py`)
- Inference service → Paths and parameters: resolves model paths (evidence: `api/predict.py`)
- Student datasets → Student preprocessing: provides source data (evidence: `README.md`)
- Student preprocessing → Processed train/test data: writes splits (evidence: `README.md`)
- Student preprocessing → Trained models and preprocessing artifacts: saves scaler and columns (evidence: `src/data_prep.py`)
- Training and evaluation base → Paths and parameters: uses random seed (evidence: `src/train/utils.py`)
- Grade regression ANN → Training and evaluation base: inherits training (evidence: `src/train/model1.py`)
- Risk classification ANN → Training and evaluation base: inherits training (evidence: `src/train/model2.py`)
- Processed train/test data → Grade regression ANN: trains regression (evidence: `README.md`)
- Processed train/test data → Risk classification ANN: trains classifier (evidence: `README.md`)
- Grade regression ANN → Trained models and preprocessing artifacts: saves trained model (evidence: `README.md`)
- Risk classification ANN → Trained models and preprocessing artifacts: saves trained model (evidence: `README.md`)
- Education staff → Student assessment: enters student profile (evidence: `README.md`)
- Education staff → Model metrics: reviews performance (evidence: `README.md`)
