Unit 9
Machine learning.
A computer that learns from examples: a line fitted to data, a neuron, training a network, and how a language model writes.
Before this unit
- Algorithms and efficiency
- The linear function Mathematics
- Statistics Mathematics
The unit, lesson by lesson
Lessons
4 lessons · 22 practice questions · about 2 hours
Learning a line
Learning from data in its simplest form: a model with two parameters, the best-fit line as what the computer learns, a prediction for a new point, the error, one outlier, and data with nothing to learn.
Neurons and weights
What an artificial neuron computes: a weighted sum plus a bias, a sigmoid that turns it into a value between 0 and 1, a network of layers, and how many weights and parameters it holds.
Training a network
How a network learns: a loss that training lowers, gradient descent step by step, XOR that one neuron cannot learn, hard tasks that take longer, and whether the network will be right on new data too.
Attention in a language model
How a language model reads and writes: tokens as numbers, an attention head choosing what to look at, copying a made-up word, and a wheel of next-token probabilities that the temperature sharpens or flattens.