Credit Risk Prediction & Decision Pipeline
A credit-default experiment on 30,000 client records, connecting feature engineering and ensemble models to an API and risk dashboard. Evaluation focuses on the trade-offs of an imbalanced dataset.
From a model score to an inspectable pipeline.
- Heterogeneous four-model ensemble
- Focal loss for class imbalance
- Experiment tracking through serving
The problem and its constraints.
The project predicts next-month credit-card default using a 30K-record dataset. It connects a modeling experiment to preprocessing, API serving, experiment tracking, and a dashboard. The reported results describe this experiment, not real-world lending outcomes.
- The CV reports a 78/22 class imbalance.
- Default recall and precision need to be considered together.
- Training and serving need consistent preprocessing.
What the evidence supports.
The CV describes Shaswot's feature engineering, four-model ensemble, focal-loss experiments, threshold calibration, and serving pipeline. The public repository provides the project implementation and documentation.
Inside the approach.
Engineer a smaller feature set
The CV reports reducing 24 raw attributes to 10 selected features and deriving cumulative delinquency features. The goal was to keep high-signal information available to the downstream models.
Compare complementary models
XGBoost, Random Forest, and PyTorch MLP models form a heterogeneous four-model ensemble with probability averaging. Focal loss and Optuna optimization address the imbalanced classification setup.
Connect calibration and serving
Five-fold out-of-fold threshold calibration sits alongside MLflow experiment tracking. FastAPI and Pydantic support prediction serving, with preprocessing, model routing, and a Streamlit/Plotly dashboard.
Results with context.
Default recall
CV-reported comparison on the project's 30K-record credit dataset.
AUC-ROC
CV-reported evaluation on the credit-default experiment.
Typed request validation and real-time feature preprocessing define the serving boundary. MLflow records experiments so model and evaluation changes can be tracked. Metrics shown here retain the CV's dataset context.
What this project demonstrates.
A useful ML project connects data preparation, model comparison, calibration, and serving instead of stopping at a single score.
Calibration plots and subgroup error analysis would make the evaluation easier to inspect. These are proposed extensions, not verified existing features.