March 2020
Beginner to intermediate
342 pages
8h 38m
English
To recap our goal: we want to write a program that calculates the number of pizzas from the number of reservations. That program should follow the approach we discussed in The Math Behind the Magic: during the training phase, the program approximates the data with a function; then, during the prediction phase, it uses the function to infer the number of pizzas.
In the general case, finding a function that approximates the data can be a lot of work. In our specific case, however, we lucked out. Our data points are roughly aligned, so we can approximate them with an especially simple function: a line.
Let’s see what that line would look like. For now, let’s pick a line that passes by the origin of the axes, as shown ...