Skip to content

Learn

Fifteen notebooks follow Priya, an analyst on Northwind Outdoor, from her own pandas notebook to a model that a second person has signed. All data is SYNTHETIC. Start with the tutorials: they run offline and need nothing but Python. The workflow notebooks build one model three ways. The agency analyst series takes on audience, lift, reach, brand and forecasting work, each in a world with a known truth. The last two show recorded sessions against the reference deployment.

Step 1Tutorials

Offline, in this order. Each one takes a single idea and runs it end to end on your laptop.

  1. Say what a number means, keep its interval, and check whether two numbers can be combined.

    OfflineAbout 15 minutes

    • Describe a number with its seven-field estimand
    • Make numbers that always carry an interval
    • Check whether two numbers can be combined (G-EST-02)
    • Add channels up honestly (G-DEP-01) and find your fallback rung
    What you need
    • Python 3.12 and uv
    • The notebooks project (babelfin comes with it)
  2. Validate a document against the contract and run the gates on your laptop, exactly as core will.

    OfflineAbout 15 minutes

    • Read every schema problem at once, each with a pointer
    • Run the gates in fallback and strict mode
    • Recognise the hard stops no mode turns off
    • Check a sealed record with Merkle proofs
    What you need
    • Python 3.12 and uv
    • Notebook 01, or the estimand idea from it
  3. Keep a pandas and NumPy workflow, record the prep, put intervals on the ROIs and package a Tier D model.

    OfflineAbout 20 minutes

    • Record pandas prep as a replayable recipe
    • Put bootstrap intervals on a plain NumPy regression
    • Package the answers as a model and gate it locally
    What you need
    • Python 3.12 and uv
    • The SYNTHETIC files in packages/finprint/examples/synthetic_data

Step 2Workflows

One media model as a scikit-learn pipeline, then as a workflow bundle in three toolkits you can compare cell by cell.

  1. A scikit-learn pipeline with adstock and saturation, a bootstrap that re-tunes, and named business questions.

    OfflineAbout 30 minutes

    • Build adstock, saturation and seasonality transformers for a Pipeline
    • Bootstrap the whole workflow, tuning included
    • Answer named business questions, each with its own estimand
    • Run the workflow twice and get the same answers
    What you need
    • Python 3.12 and uv
    • Some scikit-learn (Pipeline, GridSearchCV)
  2. Turn notebook 06's model into a workflow bundle, rerun it on new weeks, then publish, approve and serve it.

    Offline, section 3 recordedAbout 30 minutes

    • Read an input contract off a training frame
    • Save and load a workflow bundle, and score new weeks
    • See the labels when new data does not fit
    • Publish, approve and serve a bundle (section 3)
    What you need
    • Python 3.12 and uv
    • Notebook 06 helps but is not required
    • Section 3 is recorded; rerunning it needs the reference deployment
  3. The same workflow with plain NumPy functions and no modelling library at all.

    Offline, section 3 recordedAbout 20 minutes

    • Write a workflow as four plain functions
    • Save fitted state as JSON plus .npy arrays
    • Get the same labels as the scikit-learn version
    What you need
    • Python 3.12 and uv
    • Section 3 is recorded; rerunning it needs the reference deployment
  4. The same workflow in JAX on CPU, fitted by jax.grad with bootstrap draws from one jax.vmap.

    Offline, section 3 recordedAbout 25 minutes

    • Fit every parameter with jax.grad
    • Draw the bootstrap with one jax.vmap call
    • Save and restore jax.Array state, with jax in the env pin
    What you need
    • Python 3.12 and uv (JAX installs for CPU)
    • Section 3 is recorded; rerunning it needs the reference deployment

Step 3Agency analyst series

Offline. The questions a media agency's planning, audience and measurement teams get every week, each answered in a SYNTHETIC world where the true answer is known, so you can see which method finds it.

  1. A propensity model finds people who buy anyway. Build an uplift audience instead and judge it on a randomised holdout.

    OfflineAbout 25 minutes

    • Tell a response (propensity) model from an uplift model
    • Read Qini curves and AUUC on a randomised holdout
    • Hand over uplift at the top 20% with its estimand and interval
    • File a Tier D audience model and meet the segment-size privacy stop
    What you need
    • Python 3.12 and uv
    • Some scikit-learn (classifiers)
  2. A user-level holdout with ghost-ad flags. ITT, then CACE, iROAS with an interval, and why a platform A/B test never calibrates.

    OfflineAbout 30 minutes

    • Plan a lift test with power and assurance
    • Tell intent-to-treat from the effect on the exposed (CACE)
    • Correct segment results for multiple tests with Benjamini-Hochberg
    • See a class D platform A/B test excluded from calibration
    What you need
    • Python 3.12 and uv
    • Notebook 01, or the estimand idea from it
  3. Overlap and deduplicated reach from a clean room, under its privacy rules, then reach curves and how to combine vehicles.

    OfflineAbout 30 minutes

    • Work with suppressed, noised clean-room aggregates
    • See the privacy hard stops (G-PRIV-01 to 03) fire offline
    • Fit beta-binomial reach curves and check them against panel truth
    • Combine vehicles without double counting, and declare the duplication assumption
    What you need
    • Python 3.12 and uv
  4. A brand lift survey with non-response, fifteen tests corrected at once, and cost per lifted person in a brand_funnel model.

    OfflineAbout 25 minutes

    • Reweight a brand lift survey for differential non-response
    • Correct many lift tests at once with Benjamini-Hochberg
    • Turn lift points into people lifted per dollar
    • Keep a class E survey out of sales calibration
    What you need
    • Python 3.12 and uv
  5. Platform ROAS, MMM and a lift test disagree. Align their estimands and derive an attribution multiplier per channel.

    OfflineAbout 25 minutes

    • See why attributed ROAS, MMM ROI and lift iROAS answer different questions
    • Keep class A and B lift tests and exclude class D
    • Derive a multiplier per channel with a Fieller interval
    • Know where a "divide platform ROAS by N" rule stops working
    What you need
    • Python 3.12 and uv
    • Notebook 11 helps but is not required
  6. Forecast a quarter's plan, judge it on twelve weeks it never saw, and widen the interval for what the forecast does not know.

    OfflineAbout 25 minutes

    • Backtest a forecast on held-out weeks and read its interval coverage
    • Spot a plan that leaves the history the model was fitted on
    • Add scenario uncertainty instead of shipping a point forecast
    • File a forecaster as a Tier D model and see what stays pilot
    What you need
    • Python 3.12 and uv

Step 4Recorded sessions

Recorded sessions against the reference deployment. They cannot be run without it, so read them for the calls and the outputs.

  1. Drive ump-core from a notebook. File a model, see self-approval refused, sign as a second person, check the proof.

    Recorded sessionAbout 20 minutes

    • Read your portfolio and artifacts as DataFrames
    • File and submit a model, and see self-approval refused (G-INT-02)
    • Check an approval's log proof locally, then follow lineage
    What you need
    • Nothing to read it; rerunning needs the reference deployment, seeded once
    • Notebook 03, which builds the model this one files
  2. Call the apps from a notebook. Engines, the validated model and its curves, the planner, test priorities and the console.

    Recorded sessionAbout 20 minutes

    • Read a model's estimand in words and plot its curves with their band
    • Optimise a budget with an interval and P(beats plan), nothing saved
    • Rank what to test next by EIG and EVOI
    What you need
    • Nothing to read it; rerunning needs the reference deployment with its apps, seeded