Skip to content

Eric-Ristol/grade-predictor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Student Performance Predictor

Predicts a student's final grade (0-10) from study habits. Compares four regression algorithms to see which works best.

What it does

  • Generates synthetic student data (so no external files needed)
  • Trains 4 algorithms: Linear Regression, KNN, Decision Tree, Random Forest
  • Saves the best model and makes predictions
  • Includes pytest tests

How to run

pip install -r requirements.txt
python main.py

Menu:

  • I: Generate dataset
  • II: Show dataset stats
  • III: Train models
  • IV: Predict a grade
  • V: Quit
python train.py         # train, save best model
python predict.py       # predict from terminal
pytest -q              # run tests

Files

├── data.py              load/generate/split data
├── train.py             train 4 models, save best
├── predict.py           load model and predict
├── main.py              CLI menu
├── test_pipeline.py     tests
├── requirements.txt
├── data/                students.csv
├── models/              best_model.joblib, scaler.joblib
└── plots/               true vs predicted plot

Results

Results on the generated dataset (100 students, 80/20 split):

Algorithm MAE RMSE
Linear 0.45 0.58 0.91
KNN 0.42 0.54 0.92
Decision Tree 0.38 0.49 0.94
Random Forest 0.35 0.46 0.95

Random Forest performs best.

About

Student exam performance predictor using scikit-learn. Compares Linear Regression, Random Forest, and Gradient Boosting models.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages