Comparative analysis of ridge logistic regression, artificial neural networks and extreme gradient boosting for predicting loan default rate in Kenya
Date
2025
Authors
Journal Title
Journal ISSN
Volume Title
Publisher
Chuka University
Abstract
Predicting loan defaults is vital for financial institutions to mitigate losses from non repayment loans. Despite access to extensive borrower data, banks often struggle to forecast defaults accurately due to limitations in traditional parametric models, which assume fixed relationships between predictors and outcomes. These models may fail under changing borrower behavior and economic conditions. This study addresses the need for adaptive models that minimize classification error while controlling complexity. The objective was to compare the predictive performance of Ridge Logistic Regression (RLR), Artificial Neural Networks (ANN), and Extreme Gradient Boosting (XGBoost) in forecasting loan default within Kenya Commercial Banks. A retrospective predictive modeling design was employed using secondary data from the Central Bank of Kenya, covering 2012–2022. The dataset included borrower demographics, loan terms, and repayment status. Analysis was conducted using R -4.5.1 and Python, with model performance evaluated via confusion matrix metrics, Receiver Operating Characteristics (ROC), and Area Under the Curve (AUC). Descriptive analysis revealed class imbalance, variable skewness, and distinct feature distributions, highlighting the need for robust models. RLR identified key predictors such as credit type, loan purpose, gender, and age as increasing default risk, while income and marital status reduced it. However, RLR achieved only moderate accuracy (75.56%), high specificity (99.69%), and very low sensitivity (1.09%), with an AUC of 0.64. In contrast, ANN demonstrated exceptional performance with 99.99% accuracy, perfect AUC of 1.00, and minimal overfitting. The confusion matrix showed 33,686 true negatives and 10,912 true positives, with only three misclassifications. XGBoost achieved 99.9955% accuracy, 100% specificity, and 99.98% sensitivity, with zero false positives and only two false negatives. Its final log-loss of 0.0001736 indicated near-perfect probability calibration. Comparative evaluation revealed that ANN and XGBoost significantly outperformed RLR across all metrics, especially under class imbalance conditions. These findings underscore the superiority of advanced machine learning models in loan default prediction and their potential to enhance risk assessment in Kenyan commercial banks. It is recommended that financial institutions adopt models like ANN and XGBoost to improve predictive accuracy and support data-driven credit decision-making.
Description
A Thesis Submitted to the Graduate School in Partial Fulfilment of the Requirements for the Award of the Degree of Masters of Science in Applied Statistics of Chuka University Supervisors: Prof. Moses Muraya and Dr. Elizabeth Njoroge
Keywords
Loan default prediction, Ridge logistic regression, Artificial neural networks, Extreme gradient boosting (XGBoost), Machine learning, Credit risk assessment, Kenyan commercial banks
Citation
Lemasulani, M. M. (2025). Comparative analysis of ridge logistic regression, artificial neural networks and extreme gradient boosting for predicting loan default rate in Kenya [Master’s thesis, Chuka University].
