learn-prescriptive-analytics-with-phoebe / Leader session 5 of 6
Learn Prescriptive Analytics with Phoebe · Leader session 5 of 6

When optimisation beats a model

Four sessions of Ravensworth have made a case for optimisation, and a case made only by its advocate is not worth much. Tonight the question is put honestly: when is this the right tool, when is a forecast the right tool, and when is the answer that the argument was never between them. Then the strongest thing that can be said against optimisation, at full strength, because it is a real objection and it is not the one most people raise.

🟡 Foundations Anyone choosing where analytics effort goes Anyone who writes the objective 45 min
0-3 · Two machines 3-18 · Which one 18-28 · The objective 28-45 · Build-along and Q&A
Part 0

Two machines that answer different questions

Prediction estimates an unknown quantity. Optimisation chooses among actions subject to limits. Those are different jobs, they take different inputs and they fail in different ways, and most of the confusion in an analytics roadmap comes from treating them as rivals for the same slot. A good deal of the time the honest answer is that a problem presented as a prediction problem is an allocation problem wearing a forecast.

Live = presented in the 45 minutes Self-study = the full depth, after class 🔍 Every diagram zooms

★ What you walk out with tonight. Three cues you can apply in a meeting, without a whiteboard, to say which of the two a problem actually needs. A clear sight of the failure mode that has no warning light on it: an optimiser is ruthless about the objective you wrote down, and a wrong objective comes back as a plan labelled optimal. And an argument you will not be able to settle, which is the most useful kind to know about before you pick a direction.

LiveThe allocation problem wearing a forecast4 min▶

A team asks for a better demand model. Pressed on what would change if the model improved, the answer is that the mix would be set differently. Pressed further, it turns out the mix has never been set by arithmetic at all, and that the ceilings it has to fit under have never been written down in one place. Improving the forecast in that situation moves a number that nothing downstream consumes.

The tell is simple and worth listening for: ask what decision the improved prediction would change, and how. If the answer is a quantity somebody sets, under limits, the work in front of you is allocation. The forecast may still need improving, but it is not the thing standing between the business and a better week.

Real world

Ravensworth arrived with a demand forecast it believed, and four sessions later the forecast has not been touched. What changed the week was writing down three ceilings and one objective. That is not an argument that forecasts do not matter; it is an observation about which half of the work was missing at this particular mill.

Self-studyThe words tonight adds3 min▶
  • Prediction. Estimating a quantity you cannot yet observe. Output: an estimate, normally with uncertainty attached.
  • Optimisation. Choosing among actions to make one number as large or as small as possible, subject to limits. Output: a plan.
  • Allocation problem. A decision about how to split a scarce resource. Very often mistaken for a forecasting problem.
  • Objective, again. The single number the optimiser maximises. Tonight it is the thing under examination rather than an assumption.
  • Proxy objective. Something easier to write down standing in for what the business actually wants. Tonnage for margin, utilisation for value.
  • Model risk, two shapes. A prediction that is wrong, which usually looks uncertain. An objective that is wrong, which looks optimal.
  • Validation. Checking a model against outcomes it did not see. Straightforward for a forecast, and much harder for a plan the business has never run.
  • Simplification. Deliberately leaving something out of the problem so that what remains can be trusted. The centre of tonight's unresolved argument.
Part 1 · covers the choice

Estimate an unknown, or choose among actions

15 min live

Put the two side by side and the difference is not subtle. One takes history and returns a number about the world. The other takes a set of actions, one objective and a list of limits, and returns something you can put on a worksheet. They fail differently too, and the difference in how they fail matters more than the difference in what they do.

Two machines, and the question each one is built to answer PREDICTION THE QUESTION IT ANSWERS What will happen? WHAT GOES IN History, and features that carry signal about a quantity you cannot observe yet. WHAT COMES OUT An estimate of that unknown quantity, normally with a stated uncertainty around it. HOW IT FAILS By being wrong. A wrong forecast usually looks uncertain, and it can be checked against outcomes. OPTIMISATION THE QUESTION IT ANSWERS What should we do? WHAT GOES IN A set of actions you are free to choose between, one objective, and the limits you cannot cross. WHAT COMES OUT A plan you can hand to the floor, and a price on each limit that the plan ran out of. HOW IT FAILS By answering the question you wrote down, exactly, including on the occasions when it was the wrong one. More often than not, they are not alternatives at all A forecast of demand The optimisation that spends it A PLAN FOR MONDAY Three cues, usable in a meeting without a whiteboard The constraints are the hard part and the uncertainty is mild: optimisation earns its place. The relationship you need is unknown and the choice set is tiny: prediction earns its place. Very often the forecast is an input to the optimisation rather than an alternative to it.
🔍 Click to zoom - the bottom row of each card is the one that matters, because the two failures do not look alike.
LiveThe first cue, worked4 min▶

Constraints are the hard part when the number of legal plans is enormous, when several limits interact, and when the answer is not obvious to an experienced person. Ravensworth qualifies on all three, which is why margin per tonne, a perfectly correct ranking, pointed at a product that turns out to be worth nothing to the week. No amount of forecast accuracy would have caught that, because the error was not about demand.

Uncertainty being mild is the other half, and it is the half people skip. Ravensworth's uncertainty is not mild, and session 4 measured exactly what that costs: the plan sells out only about a quarter of the time. Optimisation still earns its place here, but the honest version of the cue is that it earns a place alongside a distribution, not instead of one.

LiveWhen prediction is plainly the right tool3 min▶

When the choice set is genuinely tiny, optimisation has nothing to do. Two options and no capacity interaction is not an allocation problem, it is a comparison, and the difficulty is entirely in estimating which side of the line you are on. Approve or decline, replace the part now or at the next service, treat this batch as suspect or not.

The signature is that the hard question is about the world rather than about you. If you would act correctly and immediately given a reliable number, you need the number. Building an optimiser around a two-way choice is machinery with nothing to grip.

Self-studyHow the two failures announce themselves4 min▶

A prediction can be checked against what happened. It arrives with an interval, it can be backtested against outcomes it never saw, and when it is unreliable there is usually machinery in place that says so. None of this makes forecasting easy, but it does mean the failure has a warning light on it.

A plan is harder. The business ran the plan, so the week that would have happened under a different plan is not observable, and the thing most likely to be wrong is the objective, which is not a statistical object and cannot be backtested at all. The plan arrives labelled optimal, with no interval and no error metric, and the label is accurate with respect to the objective it was given. That asymmetry is the subject of Part 2.

Part 2 · covers the counterpoint

An optimiser is ruthless about the objective you wrote down

10 min live

This is the strongest objection to everything in the course so far, and it deserves to be put at full strength rather than conceded and moved past. An optimiser does not have opinions about whether your objective is sensible. It pushes on whatever you wrote as hard as the constraints allow, and it returns the result with the word optimal attached. Change the objective to something plausible and slightly wrong, and the machine works just as hard in the wrong direction and reports the same confidence.

Four things somebody might write in the objective box, and four confident answers WHAT WAS WRITTEN DOWN WHAT THE MILL IS THEN TOLD TO DO HOW IT REPORTS ITSELF Total margin across the three products 33 Standard, 63 Dairy, no Show, worth 4,656.00 OPTIMAL Total tonnes out of the door Ship the most weight the ceilings allow OPTIMAL Milling hours used Keep the line as busy as it can possibly be OPTIMAL Premium protein drawn from the store Empty the store, because that is what was asked OPTIMAL Three of the four are proxies that already sit in somebody's system, and all four come back carrying the same word. A wrong forecast Arrives with an interval around it, a history of how it did on data it never saw, and an error metric. It announces its own unreliability. A wrong objective Arrives as a finished plan with the word optimal on it. No interval, nothing to backtest it against, and the label is true of the question it was given. The argument this opens, which is not settled Optimise a simplified problem you trust Leave out what you cannot measure. Small, checkable, and silent about everything it left out. Optimise a richer problem you cannot validate Put the real considerations in. Closer to the business, and now nobody can check whether it is right.
🔍 Click to zoom - the two failures are not symmetrical, and only one of them arrives with a warning attached.
Live The real solver, running in this page. Change the objective and watch it work just as hard in a different direction.

...

...
LiveWhy a proxy objective is the common case4 min▶

Nobody sets out to maximise the wrong thing. Proxies get written down because the real objective is hard to measure and the proxy is sitting in a system already. Tonnage is in the despatch report. Utilisation is on a dashboard. Protein consumption is in the stock file. Margin by product line, adjusted for what the relationship is worth over three years, is in nobody's system at all.

So the objective box gets filled with what is available, the optimiser does exactly as it is told, and the resulting plan is defended with the word optimal by people who are not wrong to use it. Step through the options in the box above and watch the plan move a long way while the report of it barely changes.

LiveWhat actually protects you3 min▶

Not more computation, since the arithmetic was never in question. Three things help, and all three are organisational rather than technical. Write the objective in a sentence a person outside the analytics team can disagree with. Run the plan under two or three different objectives and look at how much the answer moves, because an answer that is stable under a small change of objective is a much safer answer than one that is not. And name, out loud, what the objective leaves out.

The second of those is worth pressing on. It is cheap, it takes one more solver run, and it converts a hidden assumption into a visible spread. If the plan barely moves, the objective was not doing much work. If it moves a long way, the objective is the decision, and it deserves the attention that was being spent on the model.

Self-studyWhere serious people disagree6 min▶

Everything above is agreed. What follows is not, and it is the real argument in this field rather than a staged one. Given that the objective is where the risk lives, do you optimise a simplified problem you can trust, or a richer problem you cannot validate?

The simplifiers hold that a small, honest model is the only kind whose answer means anything. Three products, three ceilings, one objective, every input measurable, and a plan whose logic a person can follow end to end. If something important is missing, and something always is, it is missing in the open and a human adds it back at the point of decision. Their charge against the other camp is that a model nobody can check is not a model, it is an opinion with arithmetic on it, and that the first time it produces a strange answer the organisation will either follow it off a cliff or stop believing it entirely.

The enrichers hold that the simplification is where the loss actually occurs. Leaving the Show relationship, the seasonality, the changeover time and the demand spread out of the problem does not make the plan safer, it makes the plan wrong about the business in ways the optimiser then maximises with great efficiency. A richer model is harder to validate, and being unvalidated is not the same as being wrong. Their charge against the simplifiers is that a model small enough to check is usually too small to be the thing the decision rests on, and that the humans supposedly adding the missing considerations back in are the very judgement the exercise was meant to improve.

Both camps have real failures on their record. Simplified models produce confident plans that ignore something everybody in the room knew. Rich models produce plans nobody can explain, which get overridden until the model is abandoned. There is no measurement that settles this, because the thing in dispute is how much you should trust what you cannot check. What can be said is that the question is worth asking explicitly at the start of a piece of work, in the room, rather than being answered by default by whoever builds the first version.

Part 3 · build-along

Choose the tool, then attack the objective

17 min hands on

No code. Six steps on the three cues and the live box. The aim is to leave able to say, in one sentence, which of the two machines a problem in your own patch needs, and what its objective would have to say.

Apply the cues to something of your own

Take one piece of analytics work currently in flight. Run the three cues over it and say which machine it needs. If the answer is both, say which one is currently missing, because it is rarely the forecast.

Ask the tell question

For a prediction project you own: what decision would change if the model were better, and how. Write the answer in one sentence. If the sentence contains a quantity somebody sets under limits, you have found an allocation problem.

Break the mill with a plausible objective

Step the live box through all four options. Note that the status never changes, and that nothing in the output hints that three of the four are bad ideas. Say what a report containing only the plan and the word optimal would have told you.

Measure how much the objective is worth

For each of the four, read what the plan is actually worth in margin. The spread between them is the size of the objective decision. Compare that spread with anything a better forecast would plausibly have bought.

Write your objective in one sentence

For the work you named in step 1, write the objective as a sentence somebody in operations could disagree with. Then say what it leaves out. Both halves out loud, and the second half is the one people skip.

Take a side, and say what it costs you

Simplify and trust, or enrich and accept you cannot check it. Pick one for your own work, in a sentence, and name the specific failure you are accepting. There is a real one on both sides and no answer that avoids both.

The habit to keep. When a plan arrives labelled optimal, the word is about the objective and not about the business. Ask what the objective said, ask what it left out, and ask how far the plan moves if the objective changes slightly. That last one costs one more solver run and it is the cheapest insurance available.

Check yourself

Three questions

A team asks for budget to improve a demand model. What is the single most useful question to ask first?

Accuracy is only worth what the decision downstream does with it. Plenty of problems presented as forecasting problems are allocation problems wearing a forecast, and in those the ceilings and the objective have often never been written down at all.

Why is a wrong objective a more dangerous failure than a wrong forecast?

The label is accurate with respect to the question the solver was given, which is exactly what makes it misleading about the business. The optimiser works just as hard in the wrong direction and reports the same confidence either way.

Two experienced people disagree: one wants a small model with every input measurable, the other wants a model containing the considerations the business actually cares about. Who is right?

The dispute is about how much to trust what you cannot check, and no measurement settles that. What helps is asking the question explicitly at the start, rather than letting it be answered by default by whoever builds the first version.

Before session 6

Homework

Twenty minutes, on a piece of work you are currently funding.

Write the objective somebody could argue with

One sentence, no hedging, for a decision your team makes repeatedly. Then write a second sentence naming what it leaves out. Show both to someone in operations and see which one they react to.

Bring a plan you did not build

Find an optimal-sounding recommendation produced by somebody else, in your organisation or outside it. Session 6 is a list of questions to put to exactly that, and it works better with a real one in front of you.

Covered tonight

What this session covers

✓What each machine doesPrediction estimates an unknown quantity; optimisation chooses among actions under limits.
✓Allocation wearing a forecastThe tell: what decision would change if the model were better, and how.
✓Three cues for choosingHard constraints and mild uncertainty, unknown relationship and a tiny choice set, or both together.
✓The counterpoint, at full strengthA wrong objective produces a confidently wrong plan and no signal of doubt.
✓Proxy objectivesTonnage, utilisation and stock draw, all sitting in systems that already exist.
✓The unresolved argumentA simplified problem you trust, or a richer one you cannot validate. Left open.
◐Stability under a changed objectiveNamed tonight as the cheapest check available. Session 6 asks for it by name.
◐Planning against a distributionRaised as the honest qualifier on the first cue. Outlined in the practitioner track.
○How to build or evaluate a forecastModel choice, features and evaluation belong to the prediction courses.
○Choosing which decision to make at allOptions and framing live in the decision intelligence course.
○Nonlinear and convex formulationsNamed only. Everything here is linear, with whole tonnes.
Take this with you

Cheat sheet

The one sentence. Optimal is a statement about the objective you wrote, not about the business.
Prediction. Estimates an unknown quantity, and usually says how unsure it is.
Optimisation. Chooses among actions under limits, and returns a plan plus a price on each limit.
The tell. What decision would change if the model were better, and how.
Cue one. Constraints are the hard part and uncertainty is mild: optimisation.
Cue two. The relationship is unknown and the choice set is tiny: prediction.
Cue three. Very often the forecast is an input, not a rival.
The open argument. Simplify and trust, or enrich and accept you cannot check it. Pick knowingly.