ContentsChapter 0 · Start here1 of 2

0.1

What machine learning is

In this chapter
  1. 0.1What machine learning is
  2. 0.2Self-assessment
Before you readA hospital has 10,000 scans, each labelled “tumour” or “no tumour”. Another has 10,000 scans and no labels. What could you learn from each?

Machine learning is learning a function from data instead of writing it by hand. You choose a family of functions, and the data picks the member of the family that fits best.

Three kinds of task

So the labelled hospital can train a classifier; the unlabelled one can still cluster its scans.

Recall
What separates supervised from unsupervised learning?

One recipe for every algorithm

Every method in this course makes the same four choices:

  1. Data: inputs xx (vectors of features) and, if supervised, targets yy
  2. Model: a function with adjustable numbers called parameters, written θ\theta (theta). fθ(x)f_\theta(x) means “the model’s prediction for input xx using parameters θ\theta”. A line has two parameters: fθ(x)=θ0+θ1xf_\theta(x) = \theta_0 + \theta_1 x where the small numbers just label them.
  3. Loss: a number saying how wrong the model is on the data. For squared error, take each example ii square the gap between its target yiy_i and the prediction fθ(xi)f_\theta(x_i) and add them up: ∑i(yi−fθ(xi))2\sum_i (y_i - f_\theta(x_i))^2 The symbol ∑i\sum_i means “add over every example ii”.
  4. Optimiser: a way to find the θ\theta with the smallest loss. The statistics and optimisation chapter gives the two main ones: solving for where the loss stops changing, and repeatedly stepping downhill (gradient descent).

Each algorithm chapter fills in these four slots, then says when it fails. That is why the maths comes first: data are vectors and matrices (linear algebra), and most losses come from probability and statistics. Optimising also needs derivatives; this course assumes you know them.

Recall
Name the four choices every ML method makes.
Recall
What does a loss function measure?

Next, take the self-assessment. It finds which prerequisite sections you can skip.