0% found this document useful (0 votes)
243 views5 pages

Student Performance Prediction Report

This project report focuses on predicting student performance using a logistic regression model based on various academic and demographic factors. The model achieved an accuracy of 95.12%, with previous grades being strong predictors of final performance. Data preprocessing and exploratory data analysis were conducted using Python libraries such as pandas, numpy, and scikit-learn.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
243 views5 pages

Student Performance Prediction Report

This project report focuses on predicting student performance using a logistic regression model based on various academic and demographic factors. The model achieved an accuracy of 95.12%, with previous grades being strong predictors of final performance. Data preprocessing and exploratory data analysis were conducted using Python libraries such as pandas, numpy, and scikit-learn.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Student Performance

Prediction Project Report

Md Mujahid Hasan | 21201126 | CSE 404


Student Performance Prediction

1. Introduction
The goal of this project is to predict whether a student will pass or fail based on
various academic and demographic factors.

We used the Student Performance dataset, performed preprocessing and data


visualization, built a logistic regression model, and evaluated its performance.

2. Libraries Used
The following Python libraries were used:

 pandas – for data manipulation


 numpy – for numerical operations
 matplotlib and seaborn – for data visualization
 scikit-learn – for machine learning modeling and evaluation

3. Data Loading and Preprocessing


 Dataset Used: [Link]
 Separator: ;
 Previewed the first 5 rows to understand the structure.

Preprocessing Steps:
 Encoded all categorical features using LabelEncoder.
 Created a new target column called pass, where:
o 1 = Pass (if Final Grade (G3) ≥ 10)
o 0 = Fail (if G3 < 10)
 Dropped the G3 and pass columns from features (X) and used pass as
the label (y).

PAGE 1
4. Exploratory Data Analysis (EDA)

Observation:
 The distribution of final grades is approximately normal.
 Most students scored between 8 and 15.
(ii) Correlation Heatmap of Features

PAGE 2
Observation:
 The first period grade (G1) and second period grade (G2) are highly
correlated with the final grade (G3).
 Other features such as parental education, school support, and study
time also show some correlations, but not as strong.
5. Model Building
 Model Used: Logistic Regression
 Maximum Iterations: 500
 Train-Test Split: 80% training, 20% testing
 Random State: 42 (to ensure reproducibility)
6. Model Evaluation
(i) Confusion Matrix

Interpretation:
True Negatives (TN) = 26

False Positives (FP) = 1

False Negatives (FN) = 3

True Positives (TP) = 49

PAGE 3
(ii) Classification Report

7. Conclusion
 The logistic regression model performed very well, achieving an overall
accuracy of 95.12%.
 The confusion matrix and classification report show that the model is
highly capable of distinguishing between passing and failing students.
 The exploratory data analysis (EDA) highlighted that previous grades
(G1, G2) are strong predictors of final performance (G3).

PAGE 4

Common questions

Powered by AI

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.

You might also like