Skip to main content
Credit scoring predicts whether a borrower will become a bad account within a fixed period. The two common forms are an application score, made once when the loan is requested, and a behaviour score, made every month for accounts already on the books. Both fit tabSutra well, but both have a timing detail that is easy to get wrong.
For the business side of this problem, and how it compares with classic machine learning, read the case study on our website: Credit scoring for thin files and new portfolios.

The outcome window

A typical definition of a bad account is “90 or more days past due at any point in the 12 months after the observation date”. The observation date is the application date for an application score, or the snapshot date for a behaviour score. Such an answer is only known once its 12 months have passed. An application from last March has a final answer only from next March. Before that, its flag says “not bad yet”, which is not the same thing. Two practical rules follow.
  • Use as context only rows whose outcome window has ended. Rows with an open window carry a provisional answer. Leave their target empty, or leave them out.
  • When you evaluate over time, tell the model how long the window is with target_delay_days=365. Each held-out row then reads only outcomes that were final on its own date.

Application score

One row per application, with the values known on the application date.
applications.csv
Credit teams usually report the Gini coefficient, which is 2 × AUC − 1. To score today’s applications, fit on the applications whose window has ended and predict the new ones.
With explain set, each score comes with the inputs that pushed the probability of yes up or down. The inputs with the largest positive effects are the reason codes for a decline. See Explanations.

Behaviour score

One row per account per month-end, with the values as they stood on that date: balance, utilisation, days past due, payments in the month, and so on.
With group_column, each month of an account reads the account’s earlier months. This lets the model see trends such as a utilisation that has risen for three months, without you building those features by hand.

Point-in-time values

A score is only as good as the timing of its inputs. Check these before you trust a validation result:
  • Bureau attributes must be the ones pulled at the observation date, not refreshed later.
  • Status fields that a system overwrites, such as a current delinquency bucket or a closed flag, must come from a monthly history, not from today’s table.
  • Derived fields such as “months on book” must be computed at the observation date.
See Time and leakage for how the model handles dates and what it cannot check for you.

Using the probabilities

The model returns a probability for each class. Before you use it as a probability of default, for example in pricing or in expected credit loss, compare the predicted and the observed bad rates on held-out data, in bands of the score. If they differ, apply the usual calibration step on top, as you would with any model. The model does not correct for reject inference. If the context holds only approved applications, the scores describe approved applicants, as with any model built on the same data.