Student Performance Prediction Report
Student Performance Prediction Report
Logistic regression was chosen for its suitability in binary classification problems, which aligns with the goal of predicting whether a student would pass or fail. Its performance was evaluated using a confusion matrix and classification report, showing an overall accuracy of 95.12%, and displaying high capability in distinguishing between passing and failing students.
Setting a random state of 42 ensured the reproducibility of the model's training and testing processes, allowing the same data split to be used in any future experiments or evaluations, thus maintaining consistent results.
Data visualization helped in understanding data distribution and feature correlations, which were crucial for feature selection and model building. The project utilized matplotlib and seaborn libraries to create visualizations like correlation heatmaps and grade distributions.
The conclusions indicate that the logistic regression model is highly effective with an accuracy of 95.12%. It effectively distinguishes between passing and failing students, primarily by leveraging the strong predictive power of previous grades, as evidenced by the confusion matrix and classification reports.
The confusion matrix revealed 26 true negatives, 1 false positive, 3 false negatives, and 49 true positives, indicating that the model correctly classified most of the students, with very few misclassifications. This highlighted the model's high sensitivity and specificity.
EDA provided insights into the dataset, revealing a normal distribution of final grades and highlighting that most students scored between 8 and 15. It also identified strong correlations between the first (G1) and second period (G2) grades with the final grade (G3), aiding in feature selection for the model.
The preprocessing steps included encoding all categorical features using LabelEncoder, creating a target column 'pass' where a final grade (G3) of 10 or above was considered passing, dropping the G3 and pass columns from the features dataset, and using the pass column as the label for the model.
Previous grades (G1, G2) were deemed important predictors due to their high correlation with the final grade (G3). They provided a more significant insight into a student's performance trajectory compared to other features like parental education or study time, which showed weaker correlations.
Encoding categorical features with LabelEncoder converts categorical variables into numerical format, which is necessary for machine learning models like logistic regression, as they require numerical input. This transformation facilitates efficient training and improved model performance.
The project identified that the first period grade (G1) and second period grade (G2) were highly correlated with the final grade (G3), making them strong predictors of final performance. Other features such as parental education, school support, and study time showed some correlations but were weaker compared to G1 and G2.