Predicting Final CGPA of University Students Using Machine Learning : A Comparative Study of XGBoost, Random Forest, Decision Tree, and Linear Regression - Aina Mawardah Oktaviani (Programming and Algorithm Fundamentals, 2026)
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.