Where it fits

Where it started#

CompileML began as a credit-risk problem. A lender has to explain every adverse decision to the applicant, reproduce any past decision for a validator, and often run the decision on systems that predate Python. In that setting the three properties this project is built around — the artifact reproduces to the integer, it explains itself by arithmetic, and it lands where the decision already runs — are not preferences but obligations. That is why the examples, the datasets and much of the vocabulary here come from credit.

Where it applies#

Nothing in the mechanism knows about lending. A tree ensemble compiled into integer arithmetic, attributions that add back to the score, a calibrated probability, tiers, top drivers, a hash, and export to SQL are general.

The honest boundary is not "any machine learning". It is: a model on tabular data that makes a decision about an individual case, where the decision has to be explained, reproduced exactly, audited, or run somewhere other than Python. Credit is the sharpest instance of that, not its definition. The first independent evaluation of CompileML (deburky/compileml-fraud-scoring) went straight to fraud. The method carried over unchanged; of the two bugs it found, one was a credit-shaped assumption — band builders that had never met a base rate as low as fraud's.

DomainFitWhy
Fraud and anti-money-launderingstrongalert tiers, reasons an alert fired, warehouse scoring, audit trails
Insurance underwriting and claimsstrongregulated pricing, explanations owed to customers, legacy core systems
Eligibility and benefits screeningstrongdecisions about individuals that must be explained and reproduced
Clinical decision supportstrong, with carewhy a case was flagged, reproducible scores; the field has its own regulatory frameworks, which this library does not address or certify
Churn and retentionmoderatewarehouse scoring and per-customer drivers are useful; exact reproducibility matters less
Research on very wide data (e.g. genomics)weakthousands of features and usually no deployed individual decision — the fit returns when a validated score is deployed as a decision

It fits poorly where the model has to stay deep to be useful (a depth-2 whitebox is the price of exact attribution), where inputs are images, text or sequences rather than tabular features, or where no individual decision is ever made and explained.

Reading the vocabulary from another domain#

The library's names come from where it started. They are kept as they are — renaming them would break every artifact and integration built on them — so read them this way:

In CompileMLMeaningIn creditIn fraudIn clinical triageIn churn
positive outcome (y = 1)the event the model predictsdefaultfraudadverse eventchurn
pd, pd_ppmcalibrated probability of the positive outcomeprobability of defaultprobability of fraudrisk of the eventprobability of churn
bandan ordered tier of that probabilityrisk gradealert tiertriage levelrisk tier
cutoff rangewhere the decision threshold will sitrisk appetitereview capacityescalation thresholdcontact threshold
reason codea top driver of one decisionadverse-action reasonwhy the alert firedwhy the case was flaggedretention driver
risk_increasing / risk_decreasingpushes toward / away from the positive outcomeraises / lowers default riskraises / lowers fraud riskraises / lowers event riskraises / lowers churn risk
retentionhow much of the ceiling model's (the teacher's) ranking survives compilationsamesamesamesame

If you use CompileML outside credit, what compiling cost on your data is exactly what Show and tell is for.