This repository contains a machine learning project that predicts whether a student will pass or fail based on their demographic, social, and academic background.
The dataset used is the Student Performance Data Set from Kaggle.
The notebook (Pass_Fail_Prediction_UCI.ipynb) explores student data and implements machine learning models to classify if a student will achieve a passing final grade.
To improve model performance and capture deeper insights, several new features were engineered from the original dataset:
pass(Target Variable): Binary classification based on the final grade (G3 >= 10).study_efficiency: Ratio ofstudytimetoabsences + 1.social_score: Combined score ofgoout(going out with friends) andfreetime.alcohol_total: Sum of workday (Dalc) and weekend (Walc) alcohol consumption.
The dataset is preprocessed with one-hot encoding for categorical features and standard scaling for numerical features. Two classification algorithms were trained and evaluated:
-
Logistic Regression
- Accuracy: ~89.9%
- Shows strong precision and recall for both passing and failing students.
-
Random Forest Classifier
- Accuracy: ~88.6%
- Robust to non-linear relationships and utilized for sample predictions.
- Open the Jupyter Notebook (
Pass_Fail_Prediction_UCI.ipynb). - Ensure you have the required libraries installed:
pip install pandas numpy scikit-learn
- Run all cells to download the dataset via the Kaggle API, train the models, and view the evaluation metrics.
- The notebook concludes with an example of predicting the outcome for a new, hypothetical student.
- Python 3.x
- pandas
- numpy
- scikit-learn
- kaggle (for downloading the dataset directly)