Predicting a student's grade from study habits, attendance and participation
Teachers usually find out who is struggling only after exams. This project predicts a student's grade from four everyday indicators, so students at risk can be spotted early and supported.
A Logistic Regression classifier is trained on student records and evaluated with accuracy, a classification report and a confusion matrix. It then predicts the grade of a new student.
| Feature | Meaning |
|---|---|
weekly_self_study_hours |
Hours of self-study per week |
attendance_percentage |
Class attendance (%) |
class_participation |
Participation score |
total_score |
Total marks |
grade (target) |
Grade label (A, B, C, ...) |
- 🧹 Data cleaning and label encoding of grades
- 📈 EDA: attendance vs total score scatter plot
- 🤖 Logistic Regression multi-class classifier
- 📊 Accuracy, precision, recall, F1 and confusion matrix
- 🔮 Prediction for a new student, e.g.
[10 hrs, 90%, 8, 95] - 📓 Jupyter notebook version for step-by-step exploration
flowchart LR
A[student.csv] --> B[Drop ID + encode grade]
B --> C[EDA]
C --> D[Train/test split 80/20]
D --> E[Logistic Regression]
E --> F[Metrics + confusion matrix]
E --> G[Predict new student]
Student-Performance-Prediction-System/
├── data/
│ └── student.csv # Student records
├── outputs/ # Generated charts
├── src/
│ └── main.py # Training + evaluation script
├── student_perfromance (1).ipynb # Notebook version
├── requirements.txt
└── README.md
git clone https://github.com/Gaganajain/Student-Performance-Prediction-System.git
cd Student-Performance-Prediction-System
pip install -r requirements.txt
cd src
python main.py| Attendance vs score | Confusion matrix |
|---|---|
![]() |
![]() |
- Compare Decision Tree, Random Forest and XGBoost
- Feature importance chart to show which habit matters most
- Simple web form for teachers to enter student data
Gagana Jain A · GitHub
⭐ If you found this useful, consider giving the repo a star!

