Analysis and Prediction of Student Academic Performance Using Machine Learning

Received: January 25th, 2020 Revised: February 24th, 2020 Available online: march 30th , 2020 Analyzing the academic performance of students is of utmost importance for academic institutions and educationists, so as to know the ways of improving individual student’s performance. The project analyzed the past results of students including their individual attributes including age, demographic distribution, family background and attitude to study and tests this data using machine learning tools. Three models which are; Linear regression for supervised learning, linear regression with deep learning and neural network were tested using the test and train data with the Linear regression for supervised learning having the best mean average error (MAE).


INTRODUCTION
Student performance is of deep concern in the educational institutes where various factors may affect the performance of students. Predicting student academic performance has long been an important research topic in many academic disciplines [1] [2]. Based on the results of a predictive model, the instructor can take proactive measures to improve student learning, especially for those low-performing students [3] [4].
Data science and Machine learning over the years have proven very efficient and decisive in many sectors including education. This project is all about analysis of the performance of some students for a particular semester considering different factors ranging from psychological, personal, and environmental, etc. and prediction of their performance for another semester using Python programming language for data science and Machine learning [4]. Data science is a multidisciplinary field dealing with structured and unstructured data, using scientific methods, processes, algorithms, and systems to extract knowledge and insights from the data. Data science comprises the field of data mining and big data [1] [5].
Machine learning is an aspect of Artificial Intelligence (AI) in which a computing system is able to learn from data and make decisions [6]. Machine learning has become one of the most important fields within development organizations that are looking for innovative ways to grasp data assets to help the business attain a new level of understanding. Applications of machine learning include but are not limited to fraud detection, prediction of equipment failures, pattern and image recognition, etc. [7] [8].
The aim of this paper is to test the performance of different predictive models on the students' performances and to accurately predict students' course scores.

Model Selection
The three (3) regression algorithms or models to be used for the purpose of this project are listed below; Model 1 -Linear regression for supervised learning implemented with scikit-learn.

Model Training and Building
Before selecting an algorithm, applying a practical approach that can be used to solve most machine learning problems results in the machine learning process as shown in Figure 1 below.

Figure 1. Machine Learning Process
Data Analysis: In this step, descriptive statistics with the aid of visualization and plots is performed.
Data Transformation: involves transforming data from a raw state to a state suitable for modeling is where feature engineering fits in.
Model Selection: After categorizing the problem and understand the data, the next milestone is identifying the algorithms that are applicable and practical to implement in a reasonable time.
Implement the Model: Set up a machine learning model that analyzes the performance of each algorithm on the dataset using a set of carefully selected evaluation criteria.

Data Collection and Descriptive Analysis
The data for this project was collected from Kaggle with 648 data set and twenty two 22 attributes. The data was divided into 2 parts with 325 data sets for training titled Train.CSV and 323 serving as test data named Test.CSV. This data captures the performance of randomly selected students. The data attributes are shown as presented in Table 1 below. The student performance dataset contains twenty two (22) factors ranging from psychological, personal and environment. The factors include the level of student attendance, distance from home to school, reading hours, educational support, health status, Father's and mother's education level and more. Educational support from family (binary: 'yes' -1 or 'no' -0) paid Extra paid classes within the course subject (binary: 'yes' -1 or 'no' -0) activities Extra-curricular activities (binary: 'yes' -1 or 'no' -0) nursery Attended nursery school (binary: 'yes' -1 or 'no' -0) higher Desire for higher education (binary: 'yes' -1 or 'no' -0) internet Internet access at home (binary: 'yes' -1 or 'no' -0) famrel The quality of family relationships (numeric: from 1 -very bad to 5 -excellent) freetime Free time after school (numeric: from 1 -very low to 5 -very high) Health health status of student (numeric: from 1 -very bad to 5 -very good) absences Number of school absences (numeric: from 0 to 93) Score (numeric, 0-60) The summary of the data used are presented in figures 2 and 3 below. Figures 2 and 3 show the result of exploratory analysis done indicating each information of each column in the train and test dataset e.g. the number of columns, type of value in each column (int or object).   Figure 4 presents the gender distribution plot of the total count while Figure 5 shows the age distribution of the students between the ages of 10 to 17 with the highest frequency being 11 years old.   After the data analysis has been completed, the next step is the Data Transformation. Figures 7 and 8 show samples of the original train dataset and transformed train dataset respectively. Figure 7 shows the train dataset for this project indicating all parameters from the S/N to the SCORE. Models will be built with this dataset, then used to make predictions on the test dataset while Figure 8 is the transformed train data converting all object values to integers.

Model 1 -Linear regression for supervised learning with scikit-learn
All 21 attributes with the exception of the "Score" are used as inputs (independent variables) to the system while the output (dependent variable) was the "Score" to get the Beta coefficients of the training dataset. Thereafter, the beta coefficients was used alond with all the 21 independent variables to predict students scores using the test dataset.

Model 3 -Neural Network Model with Deep Learning
To rescale our data we will use the function MinMaxScaler of Scikit-learn. With tf.contrib.learn it is very easy to implement a Deep Neural Network. 5 hidden layers with 200, 100, 50, 25 and 12 units respectively and the function of activation Relu with learning rate of 0.01 was implemented. The optimizer used is an AdaDelta optimizer. Figure 11. Regression performance output and linear regression graph Model 3 Figure 11 displays the linear regression graph for the third model plotting the actual score against the predicted score with metric: MAE = 6.23 and the linear regression graph for the first model plotting the actual score against the predicted score.
The model did not perform better than the first and second models because it has a higher MAE than the other models. After going through the three models and how they performed on the train data. The Linear regression model for supervised learning with Sci-kit Learn was the best of the three having the best MAE.

Platform Model Deployment
The Student Performance Prediction platform was designed using Heroku. The attributes are selected using the easy to use graphical user interface and prediction carried out. The graphical user interfaces are shown in the Figures 12 -14 below.

CONCLUSION
To achieve student performance prediction with a well-labeled dataset which makes it a regression problem and a supervised learning data, some of the best regression algorithms were used to solve the problem. Linear regression for supervised learning with Sci-kit learn gave us the most preferable model with a Mean Absolute Error of 3.26.
All these were achieved with our dataset of 325 entries; however, the result could be better if the dataset was much bigger, let say having thousands more entries or more. Machine learning algorithms try to find patterns in data that make them efficient in the use of huge datasets. This does not mean machine learning can't be effective on small datasets.
For further researches on student performance, I recommend the use of very large data, at least a 5,000 entries dataset. Huge data gives room for more Train data helping the algorithms to find patterns and make accurate predictions.