Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Test Score Predictor (XGBoost)
|
| 2 |
+
|
| 3 |
+
This model predicts **final test scores** for students based on previous performance and study habits.
|
| 4 |
+
It was trained on a **synthetic dataset of 1,000 rows** generated to reflect average realism (balanced distribution of student profiles).
|
| 5 |
+
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
## π Input Features
|
| 9 |
+
|
| 10 |
+
The model expects the following features:
|
| 11 |
+
|
| 12 |
+
- **`previous_test_score`** β Studentβs most recent test score (0β100)
|
| 13 |
+
- **`motivation_level`** β Self-reported motivation (1β10)
|
| 14 |
+
- **`self_confidence`** β Confidence in academic ability (1β10)
|
| 15 |
+
- **`study_environment_quality`** β Quality of study environment (1β10, quiet & focused = higher)
|
| 16 |
+
- **`time_management_skill`** β Time management ability (1β10)
|
| 17 |
+
- **`last_minute_cram_hours`** β Hours crammed the night before the test (0β12)
|
| 18 |
+
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
## π― Output
|
| 22 |
+
|
| 23 |
+
- **Predicted final test score** (0β100)
|
| 24 |
+
- Can also be mapped to a **letter grade (AβF)**
|
| 25 |
+
|
| 26 |
+
| Score Range | Grade |
|
| 27 |
+
|-------------|-------|
|
| 28 |
+
| 90β100 | A |
|
| 29 |
+
| 80β89 | B |
|
| 30 |
+
| 70β79 | C |
|
| 31 |
+
| 60β69 | D |
|
| 32 |
+
| < 60 | F |
|
| 33 |
+
|
| 34 |
+
---
|
| 35 |
+
|
| 36 |
+
## π οΈ Usage
|
| 37 |
+
|
| 38 |
+
### 1. Install dependencies
|
| 39 |
+
|
| 40 |
+
```bash
|
| 41 |
+
pip install xgboost scikit-learn pandas joblib
|
| 42 |
+
import joblib
|
| 43 |
+
import pandas as pd
|
| 44 |
+
|
| 45 |
+
# Load the trained model
|
| 46 |
+
model = joblib.load("xgb_test_score_model.pkl")
|
| 47 |
+
|
| 48 |
+
# Example student
|
| 49 |
+
student = pd.DataFrame([{
|
| 50 |
+
"previous_test_score": 72,
|
| 51 |
+
"motivation_level": 8,
|
| 52 |
+
"self_confidence": 7,
|
| 53 |
+
"study_environment_quality": 6,
|
| 54 |
+
"time_management_skill": 5,
|
| 55 |
+
"last_minute_cram_hours": 3
|
| 56 |
+
}])
|
| 57 |
+
|
| 58 |
+
# Predict final score
|
| 59 |
+
prediction = model.predict(student)[0]
|
| 60 |
+
print(f"Predicted final test score: {prediction:.2f}")
|
| 61 |
+
```
|