Programming and Algorithm Fundamentals
Vol. 1 No. 2 (2026): April: Programming and Algorithm Fundamentals

Predicting Final CGPA of University Students Using Machine Learning : A Comparative Study of XGBoost, Random Forest, Decision Tree, and Linear Regression

Aina Mawardah Oktaviani (Universitas Diponegoro)



Article Info

Publish Date
30 Apr 2026

Abstract

Predicting student academic performance is a critical task for educational institutions to identify at-risk students and improve educational outcomes. This study develops a machine learning-based predictive model for forecasting final Cumulative Grade Point Average (CGPA) of university students using demographic, academic, and lifestyle-related features. The dataset comprises 5,000 student records with ten attributes including gender, age, major, attendance percentage, study hours per day, previous CGPA, sleep hours, social hours per week, and final CGPA as the target variable. Four regression algorithms were implemented and compared: Linear Regression, Decision Tree Regressor, Random Forest Regressor, and XGBoost Regressor. Exploratory Data Analysis (EDA) revealed that Previous CGPA exhibits the strongest positive correlation with Final CGPA (r = 0.88), followed by Attendance Percentage (r = 0.30) and Study Hours Per Day (r = 0.23). Sleep Hours showed a weak negative correlation (r = -0.01). Among the evaluated models, XGBoost achieved the highest predictive performance with an R² score of 0.949, RMSE of 0.119, and MAE of 0.098. This study shows that the ensemble method, especially XGBoost, far outperforms simple linear models in capturing complex non-linear relationships on students' academic performance prediction tasks. These findings provide valuable insights for designing early intervention strategies and personalized academic support systems in colleges.

Copyrights © 2026






Journal Info

Abbrev

PAF

Publisher

Subject

Description

Aims This journal aims to disseminate fundamental and applied research in programming, algorithm design, and computational problem-solving that form the foundation of modern computing systems. Scope Algorithm design and complexity analysis Data structures and optimization techniques Programming ...