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 settings

Both models are fitted on the other applications. Compare them on the held-out applications.

Trees are added one at a time, each correcting what came before. A fifth of the fitted applications is kept aside, and tree growth stops when they no longer improve.

These settings start at Decisimo’s defaults for fitting a gradient boosting challenger. The scorecard uses the scorecard builder’s settings.

Boosted model Gini

0.518
Scorecard Gini0.503
Gini difference+0.014
Chance p-value0.668

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

BoostedScorecard

What the Gini costs

Trees74
Total leaves448
Columns used16

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

Also in scorecardBoosted model only

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.

UseColumnTypeEffect shareSplit gainSplitsIn scorecard
checking_statusText29.6%35.1%50Yes
durationNumber14.0%15.4%57Yes
purposeText12.2%9.1%43Yes
credit_historyText7.5%5.9%25Yes
employmentText6.6%4.5%27Yes
ageNumber6.2%7.1%42Yes
savingsText5.0%3.5%15Yes
housingText4.8%3.3%14No
propertyText4.3%3.7%19No
credit_amountNumber3.0%6.5%42No
installment_rateText2.6%2.6%19Yes
other_installment_plansText2.0%1.5%7No
personal_statusText1.2%0.6%4Yes
residence_sinceText0.4%0.7%5No
existing_creditsText0.4%0.4%4No
telephoneText0.2%0.1%1No
other_debtorsText0.0%0.0%0Yes
jobText0.0%0.0%0No
people_liableText0.0%0.0%0No
foreign_workerText0.0%0.0%0No

PD by characteristic

Average boosted PDHeld-out bad rate

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

OutcomeBad
Boosted PD58.1%
Scorecard score459

The boosted model starts each application at the average PD of 26.2%. These reasons move this application to 58.1%.

ColumnValueLog odds effect
duration48+0.796
age22+0.452
checking_status0 <= ... < 200 DM+0.397
purposeradio/television−0.278
propertyreal estate−0.180
savings... < 100 DM+0.090
employment1 <= ... < 4 years+0.071
housingown−0.061
credit_historyexisting credits paid back duly till now+0.057
credit_amount5,951+0.054
personal_statusfemale : divorced/separated/married+0.048
installment_rate2−0.043
other_installment_plansnone−0.028
residence_since2−0.010
telephonenone−0.003
existing_credits1−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

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.