Chapter Four · Learning with Answers

Supervised Learning

Everything the book has built so far — features, labels, the training loop, the honest test — has a family name, and this chapter finally says it: supervised learning, teaching a model from examples that carry the right answer. It is the family that does most of ML's paid work, it comes in exactly two flavors depending on the shape of the answer, and by the end of the chapter you will know the classic models inside it — including the strange fact that the best one is often a committee.

5 topics

Chapters 2 and 3 quietly assumed one thing about the training table: it had an answer column. Delivery rows came with the actual minutes; review rows came with a human's genuine-or-fake mark. Learning from examples that include the right answer is called supervised learning, and it is not one technique among many — it is the workhorse behind most of the predictions businesses run, for the simple reason that business history is full of recorded answers.

The chapter walks it in five steps. First the family itself: what "supervised" precisely means and where the answers come from. Then its two faces, told apart by one glance at the answer's shape — classification, when the answer is a kind, and regression, when the answer is a number. Then a tour of three simple models that turn features into answers by three genuinely different strategies. And finally the trick that wins on business tables again and again: hundreds of small models voting as one.

The two supervised questions — same machinery, different answer shape
"Which kind is it?"
Is this review genuine or fake? Is this transaction fraud? The answer is a category from a fixed menu — classification.
"How much will it be?"
How many minutes until this order arrives? How many orders on Friday? The answer is a number on a scale — regression.

Topics in This Chapter