Student Performance
Prediction

Enter student data and our machine learning model predicts academic performance with personalized insights and recommendations.

89%
Model Accuracy
14
Input Features
2000+
Training Samples
5
Grade Classes
Backend URL: http://localhost:5000
👤
Personal Info
65%
📚
Academic Habits
5 hrs/day
75%
7 hrs
🏠
Background Factors
🎯
Prediction Result
—
GRADE
Performance Score —
—
Category
—
Confidence
💡
Recommendations
📊
Top Feature Importance
🧠
ML Algorithms Used
🌲 Random Forest Classifier
📈 Gradient Boosting
📊 Feature Importance
🔢 Cross Validation
⚖️ StandardScaler
🎯 Stratified Split
89%
Accuracy
200
Trees
14
Features
📋
Input Features
Feature Type Range
Study HoursContinuous0–12 hrs
AttendanceContinuous30–100%
Previous GradesContinuous0–100
Parental EducationOrdinal0–4
Sleep HoursContinuous3–12 hrs
MotivationOrdinal1–5
AbsencesContinuous0–30
Internet AccessBinary0/1
TutoringBinary0/1
⚙️
How It Works
1

Data Collection

Student data is collected including academic, behavioral, and socio-economic factors (14 features total).

2

Preprocessing

Features are normalized using StandardScaler. Categorical variables are label encoded. Data is split 80/20 for training and testing.

3

Model Training

Random Forest with 200 trees is trained. Feature importance is computed. 5-fold cross-validation ensures reliability.

4

Prediction

Given new student inputs, the model classifies into A/B/C/D/F grades with confidence probability scores.

5

Recommendations

Based on weak feature values, the system generates personalized, actionable study recommendations.

🏗️
Tech Stack
🐍 Python 3.11
🌶️ Flask REST API
🤖 scikit-learn
🐼 Pandas
🔢 NumPy
💾 Joblib
⚛️ Vanilla JS
🎨 CSS3 Animations
🔌
REST API Documentation

POST /predict

Predict academic performance for a student.

POST http://localhost:5000/predict
Content-Type: application/json

{
  "age": 19,
  "gender": 1,
  "study_hours": 6,
  "attendance": 82,
  "prev_grades": 72,
  "parental_education": 2,
  "internet_access": 1,
  "extracurricular": 1,
  "sleep_hours": 7.5,
  "health": 4,
  "absences": 3,
  "tutoring": 1,
  "parental_support": 3,
  "motivation": 4
}
// Response
{
  "success": true,
  "predicted_grade": "B",
  "grade_category": "Good",
  "confidence": 78.5,
  "performance_score": 81.2,
  "recommendations": ["Keep up the good work!"],
  "feature_importance": [
    { "feature": "Study Hours", "importance": 24.5 },
    ...
  ]
}

GET /stats

Returns model statistics and info.

GET http://localhost:5000/stats

// Response
{
  "model_type": "Random Forest Classifier",
  "accuracy": 0.89,
  "features_used": 14,
  "training_samples": 2000,
  "grade_classes": ["A (90-100)", "B (75-89)", "C (60-74)", "D (45-59)", "F (<45)"]
}

POST /compare

Compare performance across multiple students.

POST http://localhost:5000/compare
Content-Type: application/json

{
  "students": [
    { "name": "Alice", "study_hours": 8, ... },
    { "name": "Bob", "study_hours": 3, ... }
  ]
}