Discover Artificial Intelligence (Jun 2025)

Predicting mortgage credit defaults in morocco using machine learning approaches

  • Amine Hade,
  • Mohamed Elhia

DOI
https://doi.org/10.1007/s44163-025-00303-y
Journal volume & issue
Vol. 5, no. 1
pp. 1 – 17

Abstract

Read online

Abstract This paper focuses on predicting mortgage payment defaults for clients of a leading financial institution in Morocco. Its novelty lies in the integration of machine learning techniques with data reflecting the economic and social context of the Moroccan population. This approach aims to improve the credit risk assessment by effectively distinguishing between creditworthy customers from borrowers at risk of default. Data preprocessing, such as normalization and class balancing using SMOTE, assured the quality of the data. Feature selection was performed according to advanced statistical techniques: Kruskal-Wallis test, Cramér’s V, and Information Value. From a simple model using logistic regression to modern and advanced models based on ensemble methods, ten different models were explored. Their performances were evaluated using metrics such as precision, recall, F1-score, and AUC. A bootstrap test, using the F1-score as the primary criterion, was conducted to determine whether the performance differences among the three top-performing models were statistically significant. Results reveal that among BaggingClassifier, XGBoost, and GradientBoosting, BaggingClassifier is the model best suited to our objective of minimizing false positives (FP) and false negatives (FN), while aligning perfectly with the characteristics of our dataset. With a high recall, BaggingClassifier ensures reliable detection of creditworthy clients, a critical aspect for credit risk management in a financial context. Although its precision is slightly lower than that of the other two models, BaggingClassifier compensates for this with a superior F1-score, reflecting an optimal balance between precision and recall. Furthermore, its strong AUC-ROC performance confirms its exceptional ability to effectively discriminate between positive and negative classes, reinforcing its relevance for our study.

Keywords