The field
laboratory.
Small experiments. Visible assumptions.
Every example is illustrative and runs on your device.
Shapes tell the story
Predict the output shape before you reveal the expansion.
A (3, 1) column plus a (3,) row broadcasts to a (3, 3) grid. Dimensions are compared from the right. Each pair must match or include a 1.
Illustrative, deterministic example. Turn on JavaScript to try the controls.Change an input and watch the result. The diagram scrolls horizontally.
Static reference: A (3, 1) column plus a (3,) row broadcasts to a (3, 3) grid. Dimensions are compared from the right. Each pair must match or include a 1.
What did the system know then?
Move the decision clock. An event can happen before your system knows about it.
On decision day 5, the day-2 purchase that arrived on day 7 is not yet available. Historical features need both event time and availability time.
Illustrative, deterministic example. Turn on JavaScript to try the controls.Change an input and watch the result. The diagram scrolls horizontally.
Static reference: On decision day 5, the day-2 purchase that arrived on day 7 is not yet available. Historical features need both event time and availability time.
Choose the right boundary
The same records can answer three different deployment questions.
Random splitting can mix repeated customers and future records. A chronological split tests later activity. A group split tests unseen customers.
Illustrative, deterministic example. Turn on JavaScript to try the controls.Change an input and watch the result. The diagram scrolls horizontally.
Static reference: Random splitting can mix repeated customers and future records. A chronological split tests later activity. A group split tests unseen customers.
One node. Two paths.
A reused node receives gradient contributions from every path.
For a = x × x and y = a + a, x = 3 gives y = 18 and dy/dx = 12. Overwriting a reused node’s gradient gives the wrong answer, 6.
Illustrative, deterministic example. Turn on JavaScript to try the controls.Change an input and watch the result. The diagram scrolls horizontally.
Static reference: For a = x × x and y = a + a, x = 3 gives y = 18 and dy/dx = 12. Overwriting a reused node’s gradient gives the wrong answer, 6.
Find the right evidence
A relevant document can still be the wrong source to use.
For a customer refund question, retrieve the current public 30-day policy. Exclude the retired 14-day policy and the restricted internal exception note.
Illustrative, deterministic example. Turn on JavaScript to try the controls.Change an input and watch the result. The diagram scrolls horizontally.
Static reference: For a customer refund question, retrieve the current public 30-day policy. Exclude the retired 14-day policy and the restricted internal exception note.
Is the improvement convincing?
Compare paired outcomes, then check how much the difference really tells you.
On 50 illustrative cases, 40 baseline passes and 42 candidate passes give a four-percentage-point difference. A paired bootstrap interval includes zero, so the gain is not yet shown.
Illustrative, deterministic example. Turn on JavaScript to try the controls.Change an input and watch the result. The diagram scrolls horizontally.
Static reference: On 50 illustrative cases, 40 baseline passes and 42 candidate passes give a four-percentage-point difference. A paired bootstrap interval includes zero, so the gain is not yet shown.
Find the profit, not the price
Try a toy demand curve with a unit cost and a stock limit.
In this invented model, deterministic demand is max(0, 130 − 0.65 × price), cost is ₹55, and contribution is (price − cost) × min(demand, stock). For uncertain demand, use the distribution of min(demand, stock). Capping the mean is usually wrong. This is not an estimated causal demand curve.
Illustrative, deterministic example. Turn on JavaScript to try the controls.Change an input and watch the result. The diagram scrolls horizontally.
Static reference: In this invented model, deterministic demand is max(0, 130 − 0.65 × price), cost is ₹55, and contribution is (price − cost) × min(demand, stock). For uncertain demand, use the distribution of min(demand, stock). Capping the mean is usually wrong. This is not an estimated causal demand curve.
Risk is not saveability
Who should receive the next retention contact?
For these six invented customers, picking the highest churn risks gives less incremental value than picking by estimated treatment benefit. Expected incremental contribution is uplift × ₹180 − ₹20 per contact. The estimates are illustrative, not identified from observed risk.
Illustrative, deterministic example. Turn on JavaScript to try the controls.Change an input and watch the result. The diagram scrolls horizontally.
Static reference: For these six invented customers, picking the highest churn risks gives less incremental value than picking by estimated treatment benefit. Expected incremental contribution is uplift × ₹180 − ₹20 per contact. The estimates are illustrative, not identified from observed risk.
Now make it reproducible.
The Python reference project has synthetic records, a model comparison, policy decisions, filled-in reports and failure checks that matter. It runs without an API key.
Open the reference project ↗