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
- Supervised learning: every example comes with the answer. Learn the map from input to label, then predict labels for new inputs. Regression predicts a number (a house price); classification predicts a category (tumour or not). Part II of the course.
- Unsupervised learning: no answers, only inputs. Find structure: groups of similar patients (clustering) or a few directions that explain most of the variation (dimensionality reduction). Part III.
- Reinforcement learning: an agent acts, receives rewards and learns which actions pay off. It is not covered further here.
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:
- Data: inputs (vectors of features) and, if supervised, targets
- Model: a function with adjustable numbers called parameters, written (theta). means “the model’s prediction for input using parameters ”. A line has two parameters: where the small numbers just label them.
- Loss: a number saying how wrong the model is on the data. For squared error, take each example square the gap between its target and the prediction and add them up: The symbol means “add over every example ”.
- Optimiser: a way to find the 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.