Gradient boosting against a credit scorecard
Run a credit scorecard and gradient boosting on your past applications in a minute. Compare how they rank held-out applications, the difference in Gini and whether it is beyond chance.
Applications file
Of 1,000 applications, 300 are bad and 700 are good. 0 have no known outcome and are left out.
The file is read and both models are fitted in this browser. Nothing is uploaded.
The demo uses 1,000 real credit applications from a bank in a public data set. It has 300 bad applications and 20 characteristics, the same file the scorecard builder opens on.
Boosted model Gini
On the 304 held-out applications, the boosted model’s Gini is 0.518, against 0.503 for the scorecard. The difference has a p-value of 0.668, so the boosted model has not shown better ranking on this file.
Held-out ROC curves
What the Gini costs
The boosted model has 74 trees and 448 leaves across them, reading 16 columns. The scorecard uses 10 characteristics and 48 bins, with a points value anyone can read for each bin.
What drives the model
Each bar shows a column’s share of the total change in PD across held-out applications. Darker bars mark characteristics the scorecard keeps too.
Untick a column to leave it out of both models. Both models are fitted again, for example when a column is only known after the outcome.
| Use | Column | Type | Effect share | Split gain | Splits | In scorecard |
|---|---|---|---|---|---|---|
| checking_status | Text | 29.6% | 35.1% | 50 | Yes | |
| duration | Number | 14.0% | 15.4% | 57 | Yes | |
| purpose | Text | 12.2% | 9.1% | 43 | Yes | |
| credit_history | Text | 7.5% | 5.9% | 25 | Yes | |
| employment | Text | 6.6% | 4.5% | 27 | Yes | |
| age | Number | 6.2% | 7.1% | 42 | Yes | |
| savings | Text | 5.0% | 3.5% | 15 | Yes | |
| housing | Text | 4.8% | 3.3% | 14 | No | |
| property | Text | 4.3% | 3.7% | 19 | No | |
| credit_amount | Number | 3.0% | 6.5% | 42 | No | |
| installment_rate | Text | 2.6% | 2.6% | 19 | Yes | |
| other_installment_plans | Text | 2.0% | 1.5% | 7 | No | |
| personal_status | Text | 1.2% | 0.6% | 4 | Yes | |
| residence_since | Text | 0.4% | 0.7% | 5 | No | |
| existing_credits | Text | 0.4% | 0.4% | 4 | No | |
| telephone | Text | 0.2% | 0.1% | 1 | No | |
| other_debtors | Text | 0.0% | 0.0% | 0 | Yes | |
| job | Text | 0.0% | 0.0% | 0 | No | |
| people_liable | Text | 0.0% | 0.0% | 0 | No | |
| foreign_worker | Text | 0.0% | 0.0% | 0 | No |
PD by characteristic
The line shows the boosted model’s average PD across held-out applications with this column set to each value and other columns unchanged. Its bends show what the trees learned, and the scorecard builder shows bins for the same characteristic.
One held-out application
The boosted model starts each application at the average PD of 26.2%. These reasons move this application to 58.1%.
| Column | Value | Log odds effect |
|---|---|---|
| duration | 48 | +0.796 |
| age | 22 | +0.452 |
| checking_status | 0 <= ... < 200 DM | +0.397 |
| purpose | radio/television | −0.278 |
| property | real estate | −0.180 |
| savings | ... < 100 DM | +0.090 |
| employment | 1 <= ... < 4 years | +0.071 |
| housing | own | −0.061 |
| credit_history | existing credits paid back duly till now | +0.057 |
| credit_amount | 5,951 | +0.054 |
| personal_status | female : divorced/separated/married | +0.048 |
| installment_rate | 2 | −0.043 |
| other_installment_plans | none | −0.028 |
| residence_since | 2 | −0.010 |
| telephone | none | −0.003 |
| existing_credits | 1 | −0.002 |
A positive effect raises the PD and a negative effect lowers it. The effects add up to the PD shown.
Model files
The model file contains every tree, split and leaf in the form used to run gradient boosting in a decision flow. The CSV includes each application’s PD, scorecard score, outcome and held-out status for checking both models in the model validation tool.
In Decisimo, a boosted model can run beside your scorecard as a challenger on live applications, with its reasons recorded for every decision before your team decides whether to switch. Start your trial
More risk tools
Build a scorecard bin by bin from the same file
Check either model on a scored file
Fitting details
Starting log odds = ln(bads / goods) = -0.8003 Leaf value = − ΣG / (ΣH + λ) × 0.05, λ = 1 Split gain = G_L² / (H_L + λ) + G_R² / (H_R + λ) − G² / (H + λ) Trees stop when = 154 · 74 / 1,000 max depth = 4 · min leaf = 50 · subsample = 0.8 · bins ≤ 63 Gini difference test: z = ΔAUC / SE = 0.0071 / 0.0166 = 0.430, p = 0.668
Each tree is fitted to what the trees before it got wrong. A number is cut into up to 63 bins of about equal size, and text values are ranked by their bad rate. A missing value goes down whichever side of a split helps more. Trees stop when the applications kept aside no longer improve, and DeLong’s test compares the Gini difference on the same held-out applications. Decisimo uses these same steps when it fits a gradient boosting challenger to a lender’s scorecard.
Source: Statlog (German Credit Data), Hans Hofmann, UCI Machine Learning Repository (CC BY 4.0).
Gradient boosting for credit scoring
A scorecard and a gradient boosting model rank applications by how likely they are to be bad. This tool fits both models on the same past applications and compares their Gini on applications held out from fitting.
The comparison shows whether the boosted model ranks those held-out applications better, and whether the difference is beyond chance. The drivers and partial dependence show what the boosted model learned from the file, alongside what its Gini costs to explain.
Credit scoring questions
How does gradient boosting work for credit scoring?
Gradient boosting adds trees one at a time, with each tree correcting what came before. This tool fits the boosted model on past applications and measures its Gini on applications held out from fitting.
Does machine learning beat a scorecard?
It depends on the applications and their outcomes in the file. This tool compares a boosted model and a scorecard on the same held-out applications and tests whether their Gini difference is beyond chance.
What is a gradient boosting PD model?
It is a gradient boosting model that estimates PD from application characteristics. This tool shows its partial dependence and the reasons behind one held-out application’s PD.
How can I test whether one model’s Gini is better?
Fit both models on the same applications, then compare their Gini on applications held out from fitting. This tool reports the difference and the p-value from DeLong’s paired test.
Can a gradient boosting model be explained for credit decisions?
The tool shows the columns that drive the boosted model and how each value moves one held-out application’s log odds. Its trees and leaves also show what the model’s Gini costs to explain.