Machine learning-based credit scoring: A comparative analysis of logistic regression and random forest models
Abstract
This paper presents a controlled, head-to-head comparison of Logistic Regression (LR) and Random Forest (RF) for consumer credit scoring using the German Credit dataset. A consistent pipeline -label encoding, stratified 80/20 train-test split, and five-fold cross-validation -supports like-for-like evaluation on accuracy, precision, recall, F1, ROC-AUC, and confusion matrices. Results show competitive but distinct strengths: RF attains slightly higher accuracy (0.775 vs. 0.765) and notably higher precision (0.703 vs. 0.627), reflecting fewer false positives; LR achieves higher recall for the default class (0.533 vs. 0.433) and a marginally better ROC-AUC (0.79 vs. 0.78), indicating stronger discrimination at low-FP operating points. Confusion matrices corroborate these trade-offs (LR: TN=121, FP=19, FN=28, TP=32; RF: TN=129, FP=11, FN=34, TP=26). Feature analysis aligns with domain priors: credit amount, age, and duration dominate RF importance, while LR coefficients provide directionally transparent effects for audit. Practically, the findings support a hybrid deployment: RF for back-end risk ranking and early warning, LR for audit-facing decisions and regulatory reporting. Limitations include reliance on public datasets and a focus on discrimination over calibration and fairness. Future work should examine proprietary portfolios, cost-sensitive thresholds and drift monitoring, and integrate explainable AI to reconcile lift with governance.
How this paper connects to the literature. Drag to explore, click any node to open that paper.
