Policy mining

Rule mining identifies the conditions that separate bad cases. Policy mining addresses the larger question a credit analyst must answer: given this history, what should the policy be? It follows the standard analysis in order, produces a scorecard and a cutoff, shows the reasoning behind them, and records how the result was reached.

Starting a pipeline

Open Analyses in the left menu, choose Policy mining, and then choose New pipeline.

FieldWhat it does
NameWhat to call this run
Endpoint nameWhich endpoint's decisions to read, or All endpoints
Realized outcomeThe label to model. Required unless you are recovering a policy
Recorded decision pathThe alternative to an outcome: recover the logic behind a decision your flow already recorded, such as $.decision. See Recovering a recorded policy
Decision that means declinedWith a recorded decision path, the exact value that counts as a decline
SplitOut of time measures early rows against later ones, and is the honest test for a policy you intend to run next quarter. Out of sample mixes periods and catches noise but not drift
Minimum rows per ruleThe support floor for bins and candidates, 30 by default
Challenger modelsA switch under More settings, off by default

Choose Run pipeline to queue the analysis and open its pipeline page. The page reports "Working on it. This page updates itself." together with the step currently in progress, then refreshes itself until the run finishes.

The New pipeline form has the Outcome, Split, and Support fields filled in

What the pipeline does

Each step produces an artifact for the next one to read, and the complete set is stored so that opening the page a week later shows the run as it happened.

StepWhat it produces
AnalysisThe profile of the pool: which attributes exist, their roles, what correlates with what, which ones are worth keeping, and the candidate effects
BinningEach kept attribute cut into bins that hold up, with its weight of evidence per bin and its behaviour over time
ScorecardA fit over the binned attributes, expressed as points per bin
ChallengersWhen Challenger models is on, fits gradient boosting and MARS models on the same rows as the scorecard, compares each against the scorecard on the validate rows, and checks how well the scored attributes predict each protected attribute
CutoffThe sweep: at every score threshold, the approval rate and the bad rate among what it approves, for the book and per segment
Recovered policyOnly for a recorded decision path: the knock-outs, eligibility lines and cutoff that reproduce the record
RecordThe written account of all of it

With Challenger models off, both challenger fits and the proxy check are skipped, and the rest of the run is unchanged. When the decision archive is in a Postgres database you own, that database is the log sink, and its connection allows temporary tables, the analysis, binning, scorecard fit, cutoff sweep and fairness counts are computed inside that database. Only counts and summaries return to Decisimo, and the rows stay there. With Challenger models on, the pipeline reads the pool rows out of the database to fit the challenger models.

The answer

A finished pipeline presents the answer first and leaves the supporting analysis beneath it.

It begins with "A scorecard from 6,000 outcomes", followed by its ranking performance: "Ranks the outcome with AUC 0.74 on rows it never saw (0.72 on the rows it learned from)." The first number is the one that matters. A large gap between the two indicates that the fit learned the training rows rather than the underlying pattern, and the out-of-time split exposes that distinction honestly.

The cutoff is stated next: "At 70% approval the bad rate among approvals is 4.7%." The answer is anchored at seventy percent because that is the figure a head of credit asks for first, and the curve beneath it provides the corresponding reading at any other point.

The Answer screen shows an answer card with an AUC badge, the sentence “At 70% approval the bad rate among approvals is 4.7%,” and a cutoff curve for other approval levels

The cutoff curve

The curve plots approval rate against the bad rate among approvals and marks the proposed cutoff. When product or channel attributes are available, each segment appears beside the whole book line, and this makes it possible to see why a single cutoff should not automatically apply to populations with different results: two segments can have the same approval rate and differ threefold in what they approve.

Each threshold approves rows scoring above it. Rows tied at the threshold are all declined, so the approval rate and bad rate at each point match those of a deployed rule that approves scores above the threshold.

The Cutoff sheet under the working contains the figures behind the curve, with one row for each threshold and columns for approval rate, bad rate among approved, and bad rate among declined.

What moved over time

What moved over time lists the characteristics whose behaviour did not hold across the periods, as in "3 characteristics did not hold across the periods: months in job, first-time buyer flag, DTI." A characteristic on that list is not necessarily wrong, but it is the first one to examine, because a scorecard built on an attribute that behaves differently each quarter will not perform as measured. How the answer was found explains the verdicts.

The scorecard

The scorecard displays points by band, with one strip for each characteristic and the longest bar representing the greatest number of points. Show table presents the same information as a table of characteristic, band and points, which makes it possible to read the fit line by line and question individual values. That legibility is deliberate: the fit is constrained to something a person can check.

Under the working, Scorecard bins with WOE provides the evidence for each bin, and the fit summary identifies the data used to build it: "Fitted on 5,890 rows. AUC train 0.81, validate 0.77."

Challenger models and ROC curves

With Challenger models on, the answer page shows a Challenger models section beneath the cutoff. It gives each challenger, Gradient boosting and MARS, its own finding, comparing it with the scorecard on the validate rows only.

The verdict is one of four sentences:

  • "{model} ranks risk better than the scorecard: AUC 0.78 against 0.74."
  • "The scorecard ranks risk better than {model}."
  • "{model} and the scorecard rank risk equally well", with the gap described as within sampling noise.
  • "Too few validate rows to compare {model} with the scorecard."

Under the verdict, "AUC gain +0.0400, 95% interval +0.0100 to +0.0700" gives the size of the difference. When the interval spans zero, the challenger has not shown that it is better, and the extra complexity is not yet justified. Show formula displays the fitted MARS formula, and Show table lists the share each characteristic contributes: the share of split gain for gradient boosting and the share of score swing for MARS.

How well each model separates bad customers from good ones draws one ROC curve per model, the scorecard first. Along the bottom is the share of good customers turned away, up the side the share of bad customers caught. A curve that bows further toward the top left separates better, and the dotted diagonal is chance. The solid line is New data, the validate rows the model never saw, and the dashed line is Training data. Hover over a curve to read it as "catches 80% of bad customers, turns away 30% of good ones".

Under each chart, a sentence says whether the fit holds up:

Gap between training and new-data AUCWhat the page says
Below 0.02Holds up on new data
0.02 to 0.05Somewhat better on training data than on new data
0.05 or moreOverfits. Expect live results near the new-data figure

Show table lists, for every model, the AUC on training data, the AUC on new data and the gap.

Creating a model from a challenger

Each challenger finding has a Create model button that turns the fitted challenger into a model you can test and release, without rebuilding it by hand.

  • A MARS challenger becomes a formula model, and a gradient boosting challenger becomes a trees model.
  • The new model is called after the pipeline, for example "Q3 approvals (MARS)". Its inputs are the attributes the fitted model actually uses, together with the derived features among them, the default for a missing value and the mapping for category values.
  • Its first version records which pipeline trained it, the challenger's validate AUC, the scorecard's and the verdict.

If you already have models of the same kind, a list appears beside the button, starting with New model. Choose an existing model instead and the button reads Add as new version: the challenger's inputs replace that model's input variables and the fit is added as a new version of it. Once the model exists, the link Open the model replaces the button.

Creating a model does not activate it, and does not change any decision flow. You need permission to write models, and if creation fails the page reports "The model could not be created.".

Fair lending findings

When the data contains attributes with the restricted role, the pipeline checks the cutoff against them under Fair lending. Restricted attributes never enter the scorecard. They are used only here, to measure what the cutoff does to each group. The section is absent for a recorded decision path, and for an attribute that does not have at least two groups of 100 or more validate rows.

For each attribute, the headline reads at the approval level closest to 70%: "At 70% approval, groups are approved at 62% to 78%: adverse impact ratio 0.79 against a floor of 0.8." The adverse impact ratio is the lowest group's approval rate divided by the highest, and the floor is the four-fifths rule. A ratio under the floor is marked Below the floor.

The line beneath says at which approval levels on the curve the ratio drops below the floor, or that it is above the floor at every cutoff point, so you can see whether moving the cutoff would help.

When Challenger models is on, a further line reports a proxy check: "The attributes the scorecard uses predict it at AUC 0.64, most through ZIP code (41%)." An AUC near 0.5 means the scored attributes tell almost nothing about the protected one, and a high AUC means the scorecard could reproduce it indirectly even though it never sees it.

Show table gives, per group, the rows, the bad rate, the approval rate at the headline cutoff and the bad rate among the approved.

Proposing it

A finished scorecard can be added to your decision flow in either of two ways.

Revise Risk score (Score step) takes the scorecard already used by your decision flow and stores the fitted bins and points as a new revision. A revision can be compared, backtested and released like any other change, which is what makes the path useful, and the notice confirms "Proposal saved as a revision. Its backtest is queued."

New scorecard entity creates a separate scorecard for a decision flow that has no scorecard step to revise.

In both cases, links appear to Open the scorecard and to the queued backtest. If you propose the identical scorecard twice, the page answers "This proposal is already the latest revision of that entity". Nothing is deployed until you release it.

Changing the working and recomputing

The binning is open to review. Under Binning and stability, you can drop variables you do not want and press Drop selected and refit, or press Ask AI to review so that the boundaries are examined and a proposal is returned for your approval before you choose Apply and refit. The pipeline is then requeued, reports "Pipeline requeued, recomputing on your version", and rebuilds every downstream step from that version. The record includes your override and identifies it as yours.

See How the answer was found for what is included in those panels.

When a pipeline stops

A failed pipeline reports the reason at the top of the page.

MessageWhat it means
"Too few rows carry this outcome"The window matched rows, but not enough of them are labeled to measure anything
"Too few rows to validate"The pool split left one side too thin, usually an out-of-time split on a short window
"No variables selected"Every candidate attribute was suppressed, dropped by correlation, or failed the support floor
"The scorecard fit did not converge"The fit could not settle, normally because a characteristic separates the outcome perfectly
"The recorded decision has only one value"Every row in the window carries the same decision, so there is nothing to recover
"The analysis results could not be read"The stored artifact of an earlier step is unusable. Run the pipeline again

Widening the window fixes most of these problems, and because a pipeline is inexpensive to run again with every run kept, there is no reason to overwrite one that has already told you something.