Skip to main content
In collections, a team works a portfolio of delinquent accounts. Each month it needs to know how much each account is likely to pay, so that it can decide where to spend calls, field visits and settlement offers. This page shows one way to set this up with tabSutra.
For the business side of this problem, and how it compares with classic machine learning, read the case study on our website: Recovery forecasts for collections.

The table

Use one row per account per month-end. Each row holds the values as they stood on that date.
collections.csv
There are two answers, at two levels.
  • The row answer, recovered_next_month_pct, is the amount recovered during the month after the row, as a share of the original amount due. It is known at the end of that next month.
  • The group answer, total_recovered_pct, is the account’s total recovery as a share of the original amount due. It is known once the account is closed, by full payment, settlement or write-off. It is empty while the account is open.
Expressing both answers as shares of the original amount due puts large and small accounts on one scale. It also lets you set a fixed range of 0 to 100. Many teams work with averages pivoted by month in collections, such as the average recovery of accounts at their third month. The two answers above keep the account as the unit instead. Each account’s months are read in order, and each prediction is specific to that account.

Fit and predict

Each row then carries:
  • the predicted recovery in the next month, with quantiles;
  • the predicted total recovery of the account, as of that month, with quantiles, under group.
The column last_call_note is read as text. If the fit report shows it as a category, which can happen when the notes are short and repetitive, set its type with column_types={"last_call_note": "text"}. If you also have transcripts of recorded calls, add them as another text column. The model reads each one as a few numeric columns, computed from the context’s texts only.

Keep the total above what is already recovered

The total recovery of an account cannot be lower than what the account has already paid. The model is not given this as a rule. Apply it to the predicted total after the call, with the amount recovered to date as a floor.
Apply the floor to every quantile you use, not only to the median, so that the intervals stay in order.

Backtest on a past month

To see how the model would have done at the end of July, stand at that date with as_of.
This predicts the rows whose answer came only after 31 July, from what was known on that date. An account that was still open on 31 July does not reveal its total. Compare the predictions with the recoveries that followed.

Things that often go wrong

  • Statuses written over. A collections system often keeps one current status per account, such as “settled” or “legal”. On an old row it shows today’s status, which is the answer. Take statuses from a monthly history.
  • Payments dated by posting. A payment posted on the 2nd for the previous month belongs to that previous month’s answer. Date it by when it was paid, and make sure it falls into the right month’s row.
  • Closed accounts with open months. An account closed in July should have no rows after July. Rows after the close make the model read a closed account as if it were still open.