Imagine you want to guess whether a student will pass an exam from how many hours she studied. Or you want to estimate a house’s price from its size and location. These are prediction problems—central to data science. In this chapter, we’ll look at how machines learn to make such guesses from examples, and we’ll uncover a simple but powerful idea behind almost every prediction model: splitting the world into meaningful pieces.