Definition
Let odds be the ratio of good to bad payers, (1 − PD) / PD. The score is a straight line in the logarithm of the odds, the log odds:
score = offset + factor × ln( odds ), factor = PDO ÷ ln 2, offset = base score − factor × ln( base odds )
With a base score of 600 at odds of 50 to 1 and a PDO of 20, a client at 620 has odds of 100 to 1 and a client at 580 has odds of 25 to 1. In a scorecard built on a logistic regression with weight of evidence inputs, the points of each attribute are the same formula applied to its coefficient times its WoE, plus a share of the intercept.
Worked example
Probabilities of default are converted to scores, then back, and a two-variable scorecard is turned into a table of points per attribute.
import numpy as np
pdo, base_score, base_odds = 20, 600, 50
factor = pdo / np.log(2)
offset = base_score - factor * np.log(base_odds)
def to_score(pd_):
return offset + factor * np.log((1 - pd_) / pd_)
print(f"factor = {factor:.2f} offset = {offset:.2f}")
for pd_ in (0.20, 0.10, 0.05, 1 / 51, 0.01, 0.005):
print(f"PD = {pd_:.4f} odds = {(1 - pd_) / pd_:7.1f} score = {to_score(pd_):6.1f}")
# logistic model on WoE inputs: ln(odds) = intercept + sum(beta_j * woe_j)
intercept, beta = 2.9, {"income band": 0.9, "months at address": 0.7}
woe = {"income band": {"low": -0.60, "middle": 0.05, "high": 0.55},
"months at address": {"under 12": -0.40, "12 to 60": 0.00, "over 60": 0.35}}
n_vars = len(beta)
for var, bins in woe.items():
for name, w in bins.items():
points = (beta[var] * w + intercept / n_vars) * factor + offset / n_vars
print(f"{var:18s} {name:9s} {points:6.1f} points")
total = sum((beta[v] * woe[v][k] + intercept / n_vars) * factor + offset / n_vars
for v, k in [("income band", "high"), ("months at address", "over 60")])
ln_odds = intercept + 0.9 * 0.55 + 0.7 * 0.35
print(f"high income, over 60 months: {total:.1f} points = {offset + factor * ln_odds:.1f} from the model directly")Output, produced by running the code above when this page was built:
factor = 28.85 offset = 487.12 PD = 0.2000 odds = 4.0 score = 527.1 PD = 0.1000 odds = 9.0 score = 550.5 PD = 0.0500 odds = 19.0 score = 572.1 PD = 0.0196 odds = 50.0 score = 600.0 PD = 0.0100 odds = 99.0 score = 619.7 PD = 0.0050 odds = 199.0 score = 639.9 income band low 269.8 points income band middle 286.7 points income band high 299.7 points months at address under 12 277.3 points months at address 12 to 60 285.4 points months at address over 60 292.5 points high income, over 60 months: 592.2 points = 592.2 from the model directly
Each 20 points double the odds. The points of the attributes add up to the score the logistic model gives directly: the scorecard is the model, written as a table.
Where it misleads
- The scale carries no information. Two scorecards with different base scores and PDO can be the same model, and one model can be presented on any scale. Scores from different scorecards are not comparable without their odds.
- The link between score and odds is the one measured on the development sample. When default rates move, a score of 600 no longer means 50 to 1, and the mapping has to be re-estimated, see calibration.
- Rounding points to integers changes the ranking slightly. The rounded scorecard should be the one validated.
- Odds are sometimes quoted as bad to good, which reverses the sign of the factor. The convention must be written next to the table.
In our work
When a client wants a model in scorecard form, we deliver the table of points with its scaling constants and validate the rounded version, on the same sealed holdout as the model it comes from.
Service: machine learning and model validation Research note: credit model validation, a worked report
References
- Siddiqi, N. (2005). Credit risk scorecards: developing and implementing intelligent credit scoring. Wiley, Hoboken.
- Thomas, L. C., Edelman, D. B., Crook, J. N. (2002). Credit scoring and its applications. SIAM, Philadelphia. doi:10.1137/1.9780898718317
- Lessmann, S., Baesens, B., Seow, H.-V., Thomas, L. C. (2015). Benchmarking state-of-the-art classification algorithms for credit scoring: an update of research. European Journal of Operational Research, 247(1), 124-136. doi:10.1016/j.ejor.2015.05.030