Downloads · 30 days
0
orimanor/exam-score-prediction-linear-regression
exam-score-prediction-linear-regression is a machine learning model from orimanor. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
Project Presentation Video click on the video
Downloads · 30 days
0
Access
Public
Updated Dec 11, 2025
Repo size
19.6 MB
Likes
0
Public
Click a slice to open those files.
.png8.6 MB · 95%
From the Hugging Face model README
** Project Presentation Video** **click on the video **
<!-- 🎥 Project Presentation Video --> <p align="center"> <a href="https://youtu.be/UxKQZzwZom8?si=aAKqtFSHNHX99sy2" target="_blank"> <img src="https://img.youtube.com/vi/UxKQZzwZom8/0.jpg" alt="Exam Score Prediction – Project Presentation Video" width="480"> </a> </p>this is the url(in case its not working):
https://youtu.be/UxKQZzwZom8?si=aAKqtFSHNHX99sy2
Author: ori manor
Assignment 2 – Regression, Classification, Clustering & Evaluation
A complete end-to-end ML project covering:
✔ EDA
✔ Research Questions
✔ Regression Models
✔ Feature Engineering
✔ Clustering
✔ Classification
✔ Model Selection & Deployment
The dataset contains 20,000 students described by academic, demographic, lifestyle, and behavioral indicators.
| Category | Features |
|---|---|
| Academic | study_hours, class_attendance, exam_score, exam_difficulty |
| Lifestyle | sleep_hours, sleep_quality |
| Demographic | age, gender |
| Preferences | study_method, facility_rating, course |
| Engineered | pca_1, pca_2, cluster_id, distance_to_centroid, sleep_study_ratio |
exam_scoreBelow are representative visualizations demonstrating trends, distributions, correlations, and relationships.

Insights

✔ study_hours, class_attendance, and sleep_hours strongly correlate with performance
✔ No significant multicollinearity
✔ Behavioral variables dominate score prediction

Insight
Clear linear trend:
More study hours → higher score.
Diminishing returns appear after ~8–9 hours/day.

Balanced representation supports fair modeling.

Insight
Strong positive effect.
Students with high attendance show significantly higher average scores.

Insight
Good sleepers outperform poor sleepers by ~10 points.
Sleep quality meaningfully affects academic output.

1️⃣ Coaching
2️⃣ Mixed
3️⃣ Online
4️⃣ Self-study (lowest)

Insight
Age is not a meaningful predictor.
Scores remain constant across age groups.
Baseline model: Simple Linear Regression.

Interpretation
Predictions align closely with the diagonal → strong model calibration.

Insight
Residuals approximate a normal distribution → assumptions of linear regression hold.
Includes:
✔ One-hot encoding
✔ Scaling
✔ PCA (2 components)
✔ KMeans clustering
✔ Ratios (sleep_study_ratio)

Models evaluated:

| Model | R² | RMSE | Conclusion |
|---|---|---|---|
| Linear Regression | 0.733 | 9.77 | ⭐ Best regression model |
| Engineered Linear Regression | 0.732 | 9.77 | Similar performance |
| Random Forest | 0.693 | 10.63 | Slight overfitting |
| Gradient Boosting | 0.729 | 9.84 | Good but not best |
Clustering adds nonlinear structure that improves tree-based models.
KMeans (k=3) used with PCA projections for insight into behavioral groupings.
Exam scores converted into equal-sized quantile buckets:
Classes remain balanced, supporting reliable evaluation.
Models trained:
Performance mainly judged by recall, important for identifying struggling students.



✔ Linear Regression
File: winning_model.pkl
✔ Logistic Regression
File: winning_classification_model.pkl
Chosen for:
import pickle
import numpy as np
with open("winning_classification_model.pkl", "rb") as f:
model = pickle.load(f)
example = np.array([your_feature_vector]).reshape(1, -1)
prediction = model.predict(example)
print(prediction)
Feel free to open an issue or reach out for improvements.