R.K. HendersonAI leader · data scientist

Data & decisions / 10

data & ML engineering

Decision platform

The engineering around a model: a scheduled pipeline, tested SQL models, governed metrics, a gated model, a scoring service and monitoring.

The decisionWhich U.S. markets will grow purchase lending next year, delivered by a system that keeps the answer fresh and trustworthy.

Decisions 7 steps Synthetic or public data

Executive brief

The decision, in two minutes.

Two-minute read · one-page PDF with the call, the evidence, the limits and a 90-day plan
Try the live demo Download the brief (PDF)
Decision brief · Data & ML engineering

The engineering around a model: a scheduled pipeline, tested SQL models, governed metrics, a gated model, a scoring service and monitoring.

Decision platform Public data 7 decisions
12data tests run on every build
9SQL models from bronze to gold
4model versions, one promoted through the gate
7decisions, told step by step
4algorithms and methods used
The decision

Which U.S. markets will grow purchase lending next year, delivered by a system that keeps the answer fresh and trustworthy.

The problem

Most models fail in the plumbing, not the math: stale data, numbers defined differently in every report, a model nobody can trace back to its training data, and no signal when the world shifts under it.

The answer

Promote the model that ranks markets, not the one with the lowest error, because the decision is which markets to prioritize.

What it changed
1 Twelve data tests on every build, with warnings kept apart from failures that stop the line.
2 A model promoted by what the decision needs: it ranks markets with +3.4 points of top-decile lift, and its forecast error is written on the model card.
3 A retrain trigger that fires for a real reason: the inputs shifted after the rate shock.

Results come from public data. They show the method, not a client result.

Inside the lab
A screen from the Decision platform app
How it was proven
  • Public data only: U.S. Census Bureau population estimates, FHFA House Price Index and HMDA aggregates via the FFIEC Data Browser API.
Gates cleared · 2 of 4
What it can’t tell you
  • It runs on public data and serves no live callers, so adoption is not measured here.
Built with

PythonSQL (SQLite)GitHub Actionsscikit-learnpytestPlotlyStreamlit

The call: Promote the model that ranks markets, not the one with the lowest error. richardhenderson.io/projects/decision-platform · Public data only · R.K. Henderson

Try it

The live demo.

The real app, running on synthetic data. Change the inputs and watch the decision move.

Interactive, synthetic data. If nobody has used it for a while it takes about 30 seconds to wake.

Open in a new tab ↗

Lineage explorer

Break something. Watch it hold.

Every table, metric, model and app in the platform, and how they connect. Click any object to walk its lineage, or run an incident drill: a late source, a schema change, a failed test, drift or a bad request, and see what the pipeline does about it.

Open full screen Keys: 1 Focus · 2 Lanes · 3 Impact · 4 Incident drill · / search

The methods

How it was built.

7 decisions, told as chapters. Swipe or step through; any chapter opens that step of the live demo.

  1. Chapter 01 of 07 · Ingest

    Where does the data come from, and how fresh is it?

    A monthly GitHub Actions job lands Census, FHFA and HMDA data and keeps the last good table when a pull comes back thin.

    Open this step
  2. Chapter 02 of 07 · Model

    How does raw data become a table you can trust?

    Nine SQL models from bronze to gold, run in dependency order, with twelve data tests and a lineage graph.

    Open this step
  3. Chapter 03 of 07 · Metrics

    Which numbers does the business see, and who owns them?

    Six governed metrics with owners, a KPI tree and a filterable dashboard over the gold layer.

    Open this step
  4. Chapter 04 of 07 · Train

    Is the model good enough to promote?

    Four candidates judged out of time; only the one that ranks markets better than chance clears the gate.

    Open this step
  5. Chapter 05 of 07 · Serve

    What happens when another system asks for a score?

    A scoring contract: schema validation, the model version, reason codes, and a 422 for a bad request.

    Open this step
  6. Chapter 06 of 07 · Monitor

    How do you know when the model has gone stale?

    Input drift, freshness and test status, with a runbook; the retrain trigger fires for a real regime shift.

    Open this step
  7. Chapter 07 of 07 · Architecture

    What does this look like inside a real organization?

    Each part mapped to its enterprise equivalent, with build-or-buy, security, cost and failure modes.

    Open this step

The call: Promote the model that ranks markets, not the one with the lowest error, because the decision is which markets to prioritize.

Data and provenance

Public data only: U.S. Census Bureau population estimates, FHFA House Price Index and HMDA aggregates via the FFIEC Data Browser API.

Methods, in order

  1. Scheduled ingestion
  2. Layered SQL models
  3. Data tests
  4. Governed metrics
  5. Model registry & promotion gate
  6. Scoring service
  7. Drift monitoring

Algorithms and stack

  • Ridge regression
  • Gradient boosting
  • Population stability index
  • SQL window functions
  • Python
  • SQL (SQLite)
  • GitHub Actions
  • scikit-learn
  • pytest
  • Plotly
  • Streamlit

Open conversations

Questions about
how it was built?

Decision Lab · live demo
Starting the demo…