# Credit Card Default Risk Prediction: A Complete Practice from Machine Learning Models to Business Decisions

> This project presents a business-oriented credit card default risk scoring system, covering the entire workflow from data exploration to model deployment, with a special focus on converting model probabilities into actionable credit risk decisions.

- 板块: [Openclaw Geo](https://www.zingnex.cn/en/forum/board/openclaw-geo)
- 发布时间: 2026-05-22T20:15:01.000Z
- 最近活动: 2026-05-22T20:18:44.168Z
- 热度: 159.9
- 关键词: 信用风险, 机器学习, CatBoost, 特征工程, 风险分层, SHAP, 类别不平衡, 金融风控
- 页面链接: https://www.zingnex.cn/en/forum/thread/geo-github-szym98-credit-risk-scoring
- Canonical: https://www.zingnex.cn/forum/thread/geo-github-szym98-credit-risk-scoring
- Markdown 来源: floors_fallback

---

## [Introduction] Credit Card Default Risk Prediction: A Complete Practice from Models to Business Decisions

This project builds an end-to-end credit card default risk scoring system, covering the entire workflow including data exploration, feature engineering, model training, threshold optimization, risk stratification, and interpretability. It focuses on converting model outputs into actionable business decisions, closely simulating real financial risk control scenarios, and provides references for relevant practitioners.

## Business Background and Problem Definition

In financial risk control, identifying defaulting customers is a core task. The goal of this project is to convert model probabilities into business outputs such as credit scores and risk stratification. The "Default of Credit Card Clients" dataset is used, which includes demographic information, credit limits, repayment history, etc. The target is binary classification (0: no default / 1: default). Due to the class imbalance in the dataset, the evaluation focuses on business-related metrics such as recall, precision, F1-score, and ROC-AUC.

## Feature Engineering and Model Training Methods

**Feature Engineering**: Clean categorical variables (integrate rare categories), construct derived features (bill/payment indicators, credit utilization, repayment behavior indicators). **Model Training**: Compare Logistic Regression, Random Forest, XGBoost, LightGBM, CatBoost; try SMOTETomek to handle imbalance (experimental); use VIF to analyze collinearity (tree models are more tolerant); Boruta feature selection to identify key variables (repayment behavior is the main one).

## Threshold Optimization and Evidence of Risk Stratification

**Threshold Tuning**: Compare F1-optimal, cost-sensitive, conservative/balanced strategies to adapt to different business goals. **Risk Stratification**: Divide model probabilities into 5 levels. Test set results show that the observed default rate increases monotonically with the level: very low (4.3%), low (10.6%), medium (18.5%), high (28.8%), very high (61.8%), which proves the model's discriminative ability.

## Model Interpretability and Final Performance

**Interpretability**: Use SHAP method to explain predictions, meeting regulatory and audit requirements. **Final Model**: Select CatBoost + Boruta feature selection. Test set performance: Accuracy 0.785, Precision 0.513, Recall 0.569, F1-score 0.539, ROC-AUC 0.780, decision threshold 0.57, which can identify nearly 60% of actual defaulting customers.

## Business Strategy Recommendations and Tech Stack

**Business Strategies**: Three typical strategies: Conservative (~0.37 threshold, detect more risks), Balanced (~0.57, balance precision and recall), Strict (>0.70, mark only high risks); recommend manual review queues (high-risk recheck, medium-risk verification, low-risk standard process). **Tech Stack**: Python ecosystem (pandas, scikit-learn, CatBoost, SHAP, etc.), recommend Python 3.10 and virtual environment.

## Limitations and Future Directions

This project is a prototype and cannot be directly used in production. Additional verification, monitoring, governance, fairness analysis, and regulatory review are required. Future recommendations: cross-time validation, model monitoring and calibration, regulatory review, interpretability review, data drift monitoring, production deployment control.

## Project Summary

This project demonstrates a complete credit risk machine learning workflow, combining predictive modeling, interpretability, threshold optimization, and risk stratification. It is a practical case for banking business scenarios and provides valuable references for risk control analysts, data scientists, etc.
