Rules nobody can write by hand
Filter 14 emails: your rules vs a learned rule
The headline: the program is an output
Traditional programming: data + rules → answers.
Machine learning: data + answers → rules. The learned rule, the model, then answers new cases. Whether it is any good is measured only on cases it has not seen.
Walk one problem from question to answer
Three ways a machine can learn
Idea 1 · supervisedFit the examples, but not too well
Idea 2 · unsupervisedFind groups nobody labelled
Idea 3 · reinforcementLearn from reward by trying
The defining rule: more experience, better performance
T, P, E for this lab. Task T: sort points into class A or B. Performance P: accuracy on 2,000 new points. Experience E: the labelled examples. The learner improves with E and levels off near the best possible accuracy, which overlap σ sets.
Distance between feature vectors, by hand and by eye
Worked example by hand: one query, four labelled points
Query q = (2, 3). Two features, so each distance is Pythagoras: subtract, square, add, take the square root. Then sort and let the k nearest vote. Do each line on paper before you press Next.
Where the test error comes from
The arithmetic for that model appears here.
Best trade-off
The identity
Each bar’s total is the sum of its three parts; the shares are part ÷ total.
The family of learning settings
Pick a column above.
Labels are the expensive part. Measuring a flower takes seconds; deciding its species takes a botanist. Settings that need fewer labels (unsupervised, semi-supervised, self-supervised, transfer) exist because labels cost time and money.