Part 1
Written summary
- Chapter 1: The Certainty Trap--–- In the winter of 2018, a self-driving car approached a deserted intersection in Tempe, Arizona.
- By the end of this chapter, you will have implemented Bayesian linear regression from first principles and visualized uncertainty growing exactly where it should—in regions where your model has never seen data.The Illusion of…
- First, the test distribution must exactly match the training distribution.
Read along — the full text
Chapter 1: The Certainty Trap--–- In the winter of 2018, a self-driving car approached a deserted intersection in Tempe, Arizona. Its primary neural network reported 99.7% confidence that the large, irregular shape ahead was a plastic shopping bag blowing across the road. The car continued at speed. The shape was actually a person walking a bicycle. The impact was fatal. The model wasn't wrong because it was inaccurate—it was wrong because it was certain.This chapter dismantles the most dangerous assumption in machine learning: that a single “best” prediction is sufficient for real-world decisions. You will learn why point estimates fail when the world changes, how to quantify what your model doesn’t know, and why probabilistic thinking separates deployable systems from brittle notebooks.
By the end of this chapter, you will have implemented Bayesian linear regression from first principles and visualized uncertainty growing exactly where it should—in regions where your model has never seen data.The Illusion of CertaintyStandard machine learning operates on a seductively simple premise: find a single set of parameters that minimizes a loss function, then deploy that model forever. Whether you’re using maximum likelihood estimation to fit a logistic regression or stochastic gradient descent to train a 175-billion-parameter language model, the underlying logic remains the same—produce one answer, accompanied by no indication of how reliable that answer might be.This approach works brilliantly when three conditions hold simultaneously.
First, the test distribution must exactly match the training distribution. Second, you must have abundant training data covering all possible inputs. Third, the cost of being wrong must be roughly symmetric—overestimating is no worse than underestimating. In the real world, none of these conditions ever hold.Consider a medical diagnosis model trained on chest X-rays from urban hospitals in North America. When deployed in a rural clinic in Southeast Asia with different equipment, patient demographics, and disease prevalence, its accuracy collapses. But the model continues to emit predictions with 98% confidence because it was never trained to know what it doesn’t know.