Regression of an exam score (0-100) from study hours, previous score, sleep hours, practice papers, attendance and extracurricular activity.
- Deterministic synthetic dataset, no downloads
- Data-leak-safe workflow: the train/test split happens BEFORE any scaling or encoding, and all transforms live inside a
Pipelinefit on the training split only - Random Forest regressor
- Extracurricular activities accepted as 1/0/yes/no in the CLI and API
- CLI and Flask web app (form + JSON API)
hours_studied, previous_score, sleep_hours, sample_papers_practiced, attendance_percent, extracurricular_activities
pip install -r requirements.txt
python -m studentperformance train
python -m studentperformance predict 7 85 7 3 90 yesOutput:
score=93.0
Run the web app:
python -m studentperformance.appOpen http://127.0.0.1:5000 or POST JSON to /api/predict.
python -m pytest -qstudent-performance-prediction/
studentperformance/
data.py # synthetic dataset generation
model.py # split-then-transform pipeline, training, prediction
cli.py # train / predict commands
app.py # Flask app
tests/test_smoke.py
requirements.txt
MIT