learn-ml-production-with-phoebe / Session 2 of 6
ML in Production: The Leader Cut · Session 2 of 6

Scope it like a project

The cheapest moment to stop a bad ML project is before anyone trains anything. After that, every week of work becomes an argument for continuing. Tonight is about the stage most teams rush: scoping. Write the problem without AI words, check whether the data and labels exist, agree the business number that would make it worth shipping, and measure the rule a model has to beat, at the label delay you really have. You leave with a one-page scoping memo, including the stop rule, for the project you brought.

🟠 Advanced Leaders who fund ML projects Builders asked "can we use AI for this?" 45 min
0-3 · Welcome 3-18 · Scoping, baselines, the first rule 18-40 · Build-along: the scoping memo 40-45 · Q&A
Part 0

Where we start

Session 1 put the first deployment in the middle of the project. This session is about the left edge, the only stretch of the timeline where saying no costs a meeting instead of a quarter. Three questions decide it. Is there a real problem with an owner, data and labels behind it? What is the simplest rule that already solves part of it, and how well does that rule score? And what number, agreed in advance, would make a model worth its running cost? A project that cannot answer those three is not ready for a model, however good the demo.

🎫 Clear all three quiz questions to stamp your passport Live = presented in the 45 minutes Self-study = the full depth, after class ★ Build-along = fill it in for your own system

★ What you walk out with tonight. A one-page scoping memo for the project you brought: the problem in one sentence with no AI words, the cost of a wrong yes and a wrong no, the no-model baseline measured at your real label delay, the business number the model has to move, and a stop rule with a date on it. Plus the habit that saves the most money in ML: measure the baselines before anyone trains anything.

Part 1 · covers Ng's scoping process, week 3

Scoping is where no is still cheap

5 min live

The decision first: before a project gets a team, a leader should see it pass two checks, feasibility and value, and see the date at which it will be stopped if it does not deliver. Andrew Ng's Machine Learning in Production course puts scoping in week 3 as an optional set of five videos: "What is scoping?", "Scoping process", "Diligence on feasibility and value", "Diligence on value" and "Milestones and resourcing". The titles are read from the course page; the lecture content is reported, from compiled notes, since the official notes sit behind the course login. The titles alone make the point: value gets its own video.

SCOPING: FIVE STEPS, TWO EXITS WHERE NO IS STILL CHEAP 1 · the business problem, no AI words 2 · brainstorm solutions, ML among them 3 · diligence on feasibility 4 · diligence on value 5 · milestones and resourcing who owns it, in business words many options before one data, labels, delay the step leaders skip a stop date, written now stop: no data, no labels stop: no number worth it Steps follow Ng's week 3 scoping video titles. Each red exit costs a meeting now, or a quarter later.
🔍 Click to zoom - value diligence is the check that stops the most projects, and the one most often skipped
LiveBrainstorm problems before solutions2 min▶

Write the problem the way the business owner would say it, and ban the words AI, ML, model and predict from that sentence. "Reduce the money we lose when we buy electricity forward at the wrong price" is a problem. "Use ML to forecast prices" is a solution looking for one. The ban is practical: once the sentence names a technique, every alternative that does not use it has been ruled out before anyone compared them.

Then list solutions, plural. A rule, a process change, a better report, a human review queue, a model. The model is one row in that list, and step 3 and step 4 are how it earns its place.

LiveFeasibility: is there anything to learn from?2 min▶

Four questions, each with a written answer rather than a nod:

QuestionWhy it can stop the project
Is there data?The inputs the model would use must exist at prediction time, not only in a warehouse a week later
Are there labels?Someone or something has to record what actually happened, consistently, for enough cases
What is the label delay?How long after a prediction you learn whether it was right. It sets the baseline and the retrain policy; session 4 measures how much it matters
Is there a baseline, or human-level performance?If nobody can say how well the job is done today, nobody can say whether the model improved it
LiveValue: bridge the technical metric to a business number2 min▶

Technical teams measure accuracy, precision, error. The business measures money, time, risk, customers. Value diligence is writing the bridge between them, "every accuracy point above the baseline is worth this much, because...", and then naming the number that would make the project worth shipping and running. That number is agreed with the business owner before modeling starts, not negotiated after the results are in.

The decision you sign: the project gets a team only when the value number has a signature next to it. If nobody on the business side will put their name to a number, that is the finding.

Self-studyMilestones and resourcing, with a stop date3 min▶

Milestones turn a scoped project into dated checkpoints: data access confirmed, baseline measured, first model compared against it, a decision to deploy or not. Resourcing names the people and the running cost, which session 1 argued is mostly after launch.

The milestone that matters most is the one teams least like writing: the date at which the project stops if it has not beaten the baseline by an agreed margin. Written at scoping, it is a plan. Written after three months of work, it is a fight, and the sunk cost usually wins it.

Real world

A 2 percent gain found by fixing data, not by modeling. In Zinkevich's Rules of Machine Learning, Rule 10, "Watch for silent failures", describes a table behind Google Play that went stale for 6 months. Nothing crashed. Refreshing the table alone gave "a boost of 2% in install rate". No new model, no new feature, no research. It is the reason feasibility asks about the data before the model: the value was sitting in a pipeline nobody was watching.

Part 2 · covers baselines, and why the label delay sets them

Every model has a rule to beat

5 min live

The decision first: no model result reaches a leader without the baseline printed next to it, measured on the same rows at the same label delay. A baseline is the score you get without the model. It is the only honest reference point, and on real data it is often uncomfortably high. Here is the session 4 bench, a replay of a real electricity market, with the no-model rule at two label delays.

ACCURACY ON THE SAME ROWS: TWO MODELS AND THREE RULES axis starts at 50 percent, not 0 always DOWN no model, 1-day label delay never-retrained model weekly-refit model no model, labels 1.5 hours late 57.72 65.35 68.70 73.55 74.63 beats both 50 60 70 80 Session 4 bench: Elec2, one row per 1.5 hours, 14,656 scored rows. "No model" repeats the last known label. Both models run at the default 1-day label delay. Percent correct, measured in this build.
🔍 Click to zoom - with labels 1.5 hours late, copying the last label beats a model refit every week
LiveFour kinds of baseline, and which to demand2 min▶
BaselineWhat it isOn the bench
Majority classAlways predict the most common outcomeAlways DOWN, 57.72
A rule a clerk could runA heuristic with no training: repeat the last known answer, a threshold, a lookupRepeat the last known label, 65.35 at a 1-day delay
Human-level performanceHow well the person doing the job today does it, measured on the same casesNot measured on Elec2; for your project, go and measure it
The system in place todayWhatever the business actually runs now, however unglamorousThe number the model has to beat to change anything

Demand at least the first two on every project, plus human-level whenever a human does the job today. The model's result means nothing until it sits in that table.

LiveThe Elec2 lesson: the baseline depends on the label delay3 min▶

Elec2 is one of the most used datasets for testing models that adapt to a changing world: 45,312 half-hours of the New South Wales electricity market, labelled UP or DOWN. In 2013 Indrė Žliobaitė checked it against the simplest possible rule, "repeat the current label", which she calls a moving average of one. It scores 85.3 percent on the full file, against 51 percent if the labels were independent. The file had been used in over 40 concept drift experiments, and she recommended that every result on it be compared against that rule.

The bench's thinned rows, one every 1.5 hours, tell the same story with a twist. The same rule scores 74.63 when the label arrives 1.5 hours later, and 65.35 when it arrives a day later. Same data, same rule, nine points apart. The baseline is not a property of the data; it is a property of the data and how fast you learn the truth.

The decision you sign: a baseline measured at a label delay the business does not have is not a baseline. Ask which delay it was measured at.

Self-study"A simpler model is not better" is a test, not a hope2 min▶

Breck and colleagues' ML Test Score, from session 1, lists it as model development test 5: "A simpler model is not better". It is written as something a team runs and records before launch, not a belief it holds. Train the simple thing, score it on the same rows, and keep the evidence. Paired with a baseline table, it turns "the model is good" into "the model beats these specific alternatives by this much", which is the only sentence a launch review should accept.

Real world

A hundred and thirty retrains, beaten by a copy. On the session 4 bench, the weekly-refit model retrains 130 times over two and a half years and scores 73.55 at a 1-day label delay. If the same market's labels arrived within 1.5 hours, repeating the last label would score 74.63 with no model at all. A team that measured only at its own convenient delay could ship the model and never learn that a data feed was worth more than the training pipeline.

Part 3 · covers Zinkevich Rules 1, 2, 3, 4 and 16

Launch without ML, then earn it

5 min live

The decision first: the default launch is the simplest thing that works, with the metrics wired in, and machine learning is an upgrade the project earns with data. Martin Zinkevich's Rules of Machine Learning, 43 rules from Google engineering practice, open with exactly this order. Read as a stack, each rule is a layer that only makes sense on top of the one below it.

THE LAUNCH STACK: EACH LAYER EARNS THE ONE ABOVE IT earned over time launch and iterate Rule 16 a simple model, infrastructure right Rule 4 a heuristic and the metrics Rules 1 and 2 · launch without ML upgrade trigger · Rule 3 choose ML over a complex heuristic From Zinkevich, Rules of Machine Learning. The base ships first; the model comes when the rule gets complex.
🔍 Click to zoom - the first launch is the base layer; machine learning is the upgrade, triggered when the heuristic gets too complex to maintain
LiveRule 1: "Don't be afraid to launch a product without machine learning."2 min▶

The rule's own summary is blunt: "If machine learning is not absolutely required for your product, don't use it until you have data." The reason is the data, not modesty. A heuristic in production collects the inputs and the outcomes a model will later need, and it tells you what the baseline really is.

The same rule carries the line that gets quoted most: "If you think that machine learning will give you a 100% boost, then a heuristic will get you 50% of the way there." Say plainly what it is: an illustrative rule of thumb from an experienced engineer, not a measurement. No study sits behind the 50 percent. Use it to set expectations, never as a forecast in a business case.

LiveRules 2 and 3: metrics first, and the trigger for ML2 min▶

Rule 2 is "First, design and implement metrics." Before the first model, the system should already be recording the numbers the model will be judged on, so the heuristic's score is known and the model's gain can be read against it rather than guessed.

Rule 3, "Choose machine learning over a complex heuristic", names the moment to upgrade: "A simple heuristic can get your product out the door. A complex heuristic is unmaintainable." When the rule list grows into special cases nobody can reason about, a model is the cheaper thing to maintain.

The decision you sign: the first launch uses the simplest rule that works, with the metrics live. The model is funded when the heuristic has become complex, or the data says it is leaving value behind.

Self-studyRules 4 and 16: keep it simple, then keep shipping2 min▶

Rule 4, "Keep the first model simple and get the infrastructure right", explains why: "The first model provides the biggest boost to your product, so it doesn't need to be fancy." Most of the early risk is in the pipeline, not the algorithm, which is session 1's small box again.

Rule 16, "Plan to launch and iterate", sets the cadence expectation: "Many teams have launched a model per quarter or more for years." A scoping memo that plans one launch and no second one has planned the easy half.

Real world

When the model does earn it. Rule 1 is not a verdict against ML. On the session 4 bench at a 1-day label delay, the weekly-refit model scores 73.55 against 65.35 for repeating the last known label: 8.20 points the rule cannot reach. That is what earning it looks like, a measured gap over the no-model rule at the delay the business really has, not a demo.

Build-along

The one-page scoping memo

★ 22 min · everyone builds

Take the project you brought, the one that has not launched yet. If you have none, use the worked example after the steps. Six blocks, each copied into a document and filled in. The memo fits on one page on purpose: if a block needs a second page, the project is not scoped yet. Block 6, the stop rule, is the one to write before you leave the room.

ONE PAGE, SIX BLOCKS, ONE RULE THAT CAN END IT 1 · the problem no AI words, an owner 2 · the decision wrong yes, wrong no 3 · the baselines at the real label delay 4 · feasibility data, labels, delay 5 · value a signed business number 6 · the stop rule date, baseline, margin signed by the business owner before modeling starts if by <date> the model does not beat <baseline> by <x>, we stop Blocks 3 and 5 hold the two numbers; block 6 gives them a date. Hatched: the block that is measured.
🔍 Click to zoom - the stop rule is written on the same page as the value number, before any model exists

Write the business problem in one sentence, with no AI words. No "AI", "ML", "model" or "predict". Then name the person who owns the problem, the one whose number moves if it is solved.

★ Block 1 · the problemThe problem: ______________________________________________ (no AI, ML, model or predict in this sentence) Owned by: ________________ (a person, not a team) Today we handle it by: _________________________________

Name the decision the model would make, and what each kind of mistake costs. A wrong yes and a wrong no rarely cost the same. If nobody can price either, the value block in step 5 will not survive contact with the business.

★ Block 2 · the decisionThe model would decide: ____________________________ Each time, it says yes or no to: ___________________ Cost of a wrong yes: __________ (who pays it: ________) Cost of a wrong no: __________ (who pays it: ________) If the model is off, we fall back to: ______________

Measure the baselines. The no-model rule first, measured at the label delay you really have, not the one that flatters it. Add human-level performance if a person does the job today.

★ Block 3 · the baselinesMajority class: ______ % No-model rule (describe it): ______________________ measured at our real label delay of ______: ______ % Human-level (if a human does it today): ______ % measured on ____ cases by ________ The system in place today: ______ %

Check feasibility. Give the label delay as a median and a 90th percentile: the slow tail is what decides the retrain policy in session 4.

★ Block 4 · feasibilityInputs available at prediction time? yes / no / partly: ________ Labels recorded by: ______________ for ____ cases so far Label delay: median ______ 90th percentile ______ Baseline number from block 3: ______ % Verdict: go on / stop here, because ______________________

Bridge the technical metric to the business metric. Write the chain in words, then the number that would make the project worth shipping and running. Get the owner from block 1 to sign it.

★ Block 5 · valueTechnical metric: ____________ (e.g. accuracy on held-out weeks) One point of it is worth: ________ per ________, because ________ Business metric it moves: ______________________ Worth shipping if it moves by at least: ________ Running cost per year (people, compute, labels): ________ Signed: ________________ date: ________

Set milestones, resourcing and the stop rule. Dates and names for each milestone, then the sentence that ends the project if it does not deliver. Written now, stopping is a plan; written later, it is a fight.

★ Block 6 · milestones, resourcing, stop ruleData access confirmed ........ by ________ owner ________ Baselines measured ........... by ________ owner ________ First model vs baselines ..... by ________ owner ________ Deploy decision .............. by ________ owner ________ People and budget: _______________________________ STOP RULE: if by <date> the model does not beat <baseline> by <x> points at our real label delay, we stop. Agreed by: ________________ on ________
Worked example · constructed

Northline Grid, a constructed electricity retailer. Constructed company, real bench numbers. Northline buys electricity forward and wants to know whether the New South Wales price will go UP or DOWN against its 24-hour average, to decide when to hedge. Block 1: "we lose money when we buy forward just before the price falls", owned by the head of trading. Block 3: the no-model rule, repeat the last known direction, scores 65.35 on the bench at a 1-day label delay, which is when Northline's settlement data arrives; if its data feed delivered labels within 1.5 hours, the same rule would score 74.63, above both bench models. Block 5 would carry Northline's own value number. Block 6, with a constructed margin: "if by the end of the quarter the model does not beat 65.35 by 3 points at a 1-day delay, we stop, and we price a faster data feed instead." The margin and dates are constructed; your numbers will differ.

What you would build

Measure the baselines before anyone trains anything. On Elec2 it takes five lines, and the outputs below are real, measured on the full file.

★ baselines.pyfrom sklearn.datasets import fetch_openml df = fetch_openml(data_id=151, as_frame=True).frame # Elec2, 45,312 half-hours y = (df["class"] == "UP").astype(int) print(len(df), round(1 - y.mean(), 4)) # 45312 0.5755 always DOWN print(round((y == y.shift(1)).iloc[1:].mean(), 4)) # 0.8533 repeat the last half-hour print(round((y == y.shift(48)).iloc[48:].mean(), 4)) # 0.6562 repeat the same half-hour yesterday

The second line is the rule if labels arrive at once: copy the last half-hour, 85.33 percent, Žliobaitė's moving average of one. The third is the best you can do by copying if labels arrive a day late: copy the same half-hour yesterday, 65.62 percent. The model's target is whichever line matches your label delay. For your own data, shift by your real delay in rows. Once a model exists and beats the right line, the next step is looking at what it gets wrong, which is error analysis, taught in ML Strategy session a3 ↗.

Put the stop rule in the calendar. A stop rule in a memo gets forgotten; a stop rule with a meeting invite on its date gets read. Session 6 comes back to it, because the kill decision is much easier when it was agreed before anyone had a stake in the answer.

Homework

Before session 3

30 min
  1. Write the memo for the project you brought, all six blocks, on one page. If a block will not fit, that block is the one to scope further.
  2. Measure the no-model rule on your own data at your real label delay. Shift by the delay you actually have, not by one row. Write both numbers down if the team has been quoting the fast one.
  3. Get the business owner to sign the value number. In person, on the memo. A number nobody will sign is a finding, not a formality.
  4. Write the stop rule and put a date on it, then put that date in the calendar of everyone who signed.
Check yourself

Three questions

Clear all three and session 2 gets stamped in your passport.

1 · A business case says "Google found a heuristic delivers 50% of ML's benefit, so our rule-based version will capture half the value." What is wrong with it?

The line illustrates why launching without ML is reasonable. No study sits behind the 50 percent; the business case needs its own baseline measured on its own data.

2 · On the session 4 bench, repeating the last known label scores 74.63 with labels 1.5 hours late and 65.35 with labels a day late. What does that tell a team scoping a model?

Same data, same rule, nine points apart. A baseline measured at a faster delay than you have makes the model look worse than it is; one measured slower makes it look better.

3 · Where does the stop rule "if by this date the model does not beat the baseline by this margin, we stop" belong?

Written at scoping, the stop rule is a plan. Written after months of work, the sunk cost argues against it every time.

Sources covered

What this session teaches, and where it came from

✓Ng, Machine Learning in Production, week 3 scoping videosThe five video titles read on the course page; lecture content reported from compiled notes. Videos and certificate stay official
✓Zinkevich, Rules of Machine Learning: Rules 1, 2, 3, 4, 10 and 16Read at source: titles and quoted lines, including the 50 percent rule of thumb and the 2 percent install-rate boost from a stale table
✓Žliobaitė 2013, How good is the Electricity benchmark for evaluating concept drift adaptationRead at source: the moving average of one at 85.3 percent, the 51 percent independence figure, over 40 experiments, the recommendation
✓Breck et al. 2017, The ML Test Score, model test 5Read at source: "A simpler model is not better"
✓Elec2 baselines and the session 4 benchMeasured in this build: full-file baselines from OpenML 151, bench rows at 1.5 hours and 1 day
◐Northline GridConstructed company for the worked example; its baselines are real bench numbers, its margin and dates constructed

Every fact on this page, and its verification tier, is recorded in the course's source map.

Session 2 cheat sheet · pin this

No AI words in the problemName the business problem and its owner. A technique in the sentence rules out every alternative.
Feasibility = data, labels, delay, baselineFour written answers. Any one missing is a cheap reason to stop now.
Value = a signed business numberBridge the technical metric to money or risk, and get it signed before modeling.
Baseline at the real label delaySame rule, same rows: 74.63 at 1.5 hours, 65.35 at a day. Measure at the delay you have.
Launch without ML if you canRule 1. The 50 percent line is a rule of thumb, not a measurement.
Stop rule with a dateIf by the date the model does not beat the baseline by the margin, stop. Written at scoping.