1.2 What Is Machine Learning? 9
1.2 What Is Machine Learning?
Machine learning is a set of methods that computers use to make and improve predictions or
behaviors based on data.
For example, to predict the value of a house, the computer would learn patterns from past
house sales. The book focuses on supervised machine learning, which covers all prediction
problems where we have a dataset for which we already know the outcome of interest (e.g. past
house prices) and want to learn to predict the outcome for new data. Excluded from super-
vised learning are for example clustering tasks (= unsupervised learning) where we do not
have a specic outcome of interest, but want to nd clusters of data points. Also excluded
are things like reinforcement learning, where an agent learns to optimize a certain reward by
acting in an environment (e.g. a computer playing Tetris). The goal of supervised learning is
to learn a predictive model that maps features of the data (e.g. house size, location, oor type,
…) to an output (e.g. house price). If the output is categorical, the task is called classication,
and if it is numerical, it is called regression. The machine learning algorithm learns a model
by estimating parameters (like weights) or learning structures (like trees). The algorithm is
guided by a score or loss function that is minimized. In the house value example, the machine
minimizes the dierence between the estimated house price and the predicted price. A fully
trained machine learning model can then be used to make predictions for new instances.
Estimation of house prices, product recommendations, street sign detection, credit default
prediction and fraud detection: All these examples have in common that they can be solved
by machine learning. The tasks are dierent, but the approach is the same:
Step 1: Data collection. The more, the better. The data must contain the outcome you want
to predict and additional information from which to make the prediction. For a street sign
detector (“Is there a street sign in the image?”), you would collect street images and label
whether a street sign is visible or not. For a credit default predictor, you need past data on
actual loans, information on whether the customers were in default with their loans, and data
that will help you make predictions, such as income, past credit defaults, and so on. For an
automatic house value estimator program, you could collect data from past house sales and
information about the real estate such as size, location, and so on.
Step 2: Enter this information into a machine learning algorithm that generates a sign detector
model, a credit rating model or a house value estimator.
Step 3: Use model with new data. Integrate the model into a product or process, such as a
self-driving car, a credit application process or a real estate marketplace website.
Machines surpass humans in many tasks, such as playing chess (or more recently Go) or pre-
dicting the weather. Even if the machine is as good as a human or a bit worse at a task, there
remain great advantages in terms of speed, reproducibility and scaling. A once implemented
machine learning model can complete a task much faster than humans, reliably delivers con-
sistent results and can be copied innitely. Replicating a machine learning model on another
machine is fast and cheap. The training of a human for a task can take decades (especially
when they are young) and is very costly. A major disadvantage of using machine learning is
that insights about the data and the task the machine solves is hidden in increasingly complex
models. You need millions of numbers to describe a deep neural network, and there is no way