Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/JoseOlivares19/Proyecto-PC3-JavaScript-Avanzado/llms.txt

Use this file to discover all available pages before exploring further.

UTP Risk AI helps academic advisors and learning platforms identify students who may need support before they fall behind. By combining current grade average, attendance rate, task-submission rate, participation, weekly study hours, and the most recent practice exam score, the model assigns each student to one of three risk bands and offers targeted improvement tips.

Model Details

PropertyValue
Model keyutp-risk
EndpointPOST /predict/utp-risk
Training samples260 synthetic samples
ClassifierRandomForestClassifier(n_estimators=180, max_depth=7, random_state=42, class_weight="balanced_subsample")

Output Labels

LabelMeaning
RIESGO_BAJOLow academic risk — student is on track
RIESGO_MEDIOModerate academic risk — monitor and offer targeted support
RIESGO_ALTOHigh academic risk — immediate intervention recommended

Label Decision Logic

The labelling function computes a weighted academic performance score across all six inputs:
def label_utp_risk(row):
    promedio, asistencia, tareas, participacion, horas, pc = row
    score = (
        promedio     * 3.2
        + pc         * 2.5
        + asistencia * 0.18
        + tareas     * 0.16
        + participacion * 0.10
        + horas      * 1.20
    )
    if score < 105:
        return "RIESGO_ALTO"
    if score < 150:
        return "RIESGO_MEDIO"
    return "RIESGO_BAJO"
FeatureWeightNotes
promedio_actual×3.2Strongest single predictor
nota_pc_anterior×2.5Recent exam performance
horas_estudio_semana×1.20Practice intensity
asistencia_pct×0.18Engagement proxy
tareas_entregadas_pct×0.16Consistency signal
participacion_pct×0.10Active learning indicator

Input Fields

promedio_actual
float
required
Student’s current weighted grade average on the UTP 0–20 scale. Range: 0 – 20. Carries the highest weight (×3.2) in the scoring formula.
asistencia_pct
float
required
Percentage of scheduled classes the student has attended. Range: 0 – 100. Values below 75 % trigger a specific attendance recommendation.
tareas_entregadas_pct
float
required
Percentage of assigned tasks submitted on time. Range: 0 – 100. Values below 70 % trigger a task-submission recommendation.
participacion_pct
float
required
Percentage of class activities in which the student actively participated. Range: 0 – 100.
horas_estudio_semana
float
required
Average self-reported study hours per week. Range: 0 – 40. Values below 6 hours trigger a study-hours recommendation.
nota_pc_anterior
float
required
Grade obtained on the most recent practice exam (PC) on the 0–20 scale. Range: 0 – 20. Values below 12 trigger an exam-review recommendation.

Recommendations

Recommendations are generated by inspecting the raw input values against four thresholds:
ConditionRecommendation
asistencia_pct < 75Raise attendance — the system detects a loss of academic continuity
tareas_entregadas_pct < 70Regularise task submissions — tasks demonstrate sustained practice
horas_estudio_semana < 6Increase weekly practice hours with guided exercises
nota_pc_anterior < 12Reinforce weak points from the previous exam before the final evaluation
None of the aboveMaintain the pace and solve an additional React + services integration challenge

Example Request & Response

curl -X POST http://localhost:8001/predict/utp-risk \
  -H "Content-Type: application/json" \
  -d '{
    "promedio_actual": 9.5,
    "asistencia_pct": 60.0,
    "tareas_entregadas_pct": 55.0,
    "participacion_pct": 40.0,
    "horas_estudio_semana": 3.0,
    "nota_pc_anterior": 9.0
  }'
{
  "caso": "UTP RiskAI",
  "prediccion": "RIESGO_ALTO",
  "confianza": 0.9278,
  "ranking": [
    { "clase": "RIESGO_ALTO",  "probabilidad": 0.9278 },
    { "clase": "RIESGO_MEDIO", "probabilidad": 0.0611 },
    { "clase": "RIESGO_BAJO",  "probabilidad": 0.0111 }
  ],
  "recomendaciones": [
    "Subir asistencia: el sistema detecta pérdida de continuidad académica.",
    "Regularizar entregas: las tareas evidencian práctica sostenida.",
    "Aumentar horas de práctica semanal con ejercicios guiados.",
    "Reforzar puntos débiles de la práctica anterior antes de la evaluación final."
  ],
  "entrada": {
    "promedio_actual": 9.5,
    "asistencia_pct": 60.0,
    "tareas_entregadas_pct": 55.0,
    "participacion_pct": 40.0,
    "horas_estudio_semana": 3.0,
    "nota_pc_anterior": 9.0
  }
}

Response Fields

caso
string
Always "UTP RiskAI" for this endpoint.
prediccion
string
Predicted risk label: RIESGO_ALTO, RIESGO_MEDIO, or RIESGO_BAJO.
confianza
float
Probability of the top prediction, rounded to 4 decimal places.
ranking
array
All three risk classes sorted by probability descending. Each element contains clase (string) and probabilidad (float).
recomendaciones
array
Personalised list of academic improvement tips derived from the student’s actual input values.
entrada
object
Echo of the exact request payload received by the server.
A student with promedio_actual = 18, nota_pc_anterior = 17, asistencia_pct = 95, tareas_entregadas_pct = 95, participacion_pct = 90, and horas_estudio_semana = 20 will score well above 150 and receive RIESGO_BAJO. Use this as a sanity-check payload after startup.

Build docs developers (and LLMs) love