top of page
  • Adwith Malpe

Student Grades Prediction

Machine learning is an extremely complex subject that consists of a variety of different algorithms that can be implemented to complete tasks exponentially. I decided to immerse myself within Machine Learning more by engaging in a new side project.

In this side project, I developed a Student Record Predictor that is capable of predicting a student's grade in school based on interpreting a vast variety of attributes. I extracted the student records data set from the University of California Irvine's Machine Learning Repository, where there are hundreds of data sets available to the public for use (link to UCI Database: This data set provides a total of 33 attributes to analyze from and includes multivariate characteristics.

For this project, I selected the following attributes to analyze:

  1. Study Time - weekly study time measured in hours

  2. Failures - number of past class failures

  3. Absences - number of school absences

  4. G1 - first period grade

  5. G2 - second period grade

I analyzed these attributes to predict what the student's final grade would be. The final grade is represented by the G3 attribute. To determine what the final grade would be based on these attributes, I applied a linear regression ML algorithm that identifies a particular relationship between the given attributes of a set number of students, as the input, with their expected output grades for the first and second period grade. This relationship would then be analyzed and interpreted to predict what the student's final grade would be. I chose to create a linear regression model since linear regression is commonly used to model the relationship between a scalar response and one or more explanatory variables (in this case, the different attributes I tested). This model would show me specific correlations between certain attributes such as study time where a student who spends more time studying has a different grade compared to those who do not study as much. These correlations helps understand what methods students commonly adopt or how they perform when attaining a designate grade.

I implemented this project using the Python Programming Language in Google Colab. I recommend to pip install all necessary libraries on your local machine first before running the code. If you do not want to run the program on your local machine, you may run the software on Google Colab which is a cloud computing IDE that allows you to run python script files without taking up any space on your machine.

Here is an image of the output of my linear regression model:

In this case, I plotted the final grade with respect to the first grade period, G1, attribute to see what the correlation was for each student. The independent attribute can be changed to any other attribute and then plotted to see what the relationship is, within the script. Here is the link to my github repository to access the Student Grade Predicter files:

73 views0 comments

Recent Posts

See All


Post: Blog2_Post
bottom of page