How machines learn

The core ideas every model shares. Measure how wrong a model is, follow the slope downhill to improve it, and learn why a model that memorizes its training data can still fail on new data.

Level
Beginner
Length
11 lessons, 3 hr 8 min
Assumes
Comfort with graphs and basic algebra.
Builds on
AI from zero
  1. 1The learning loopEvery trained model, from a straight line to a chatbot, improves by repeating the same four steps. Run the loop yourself and watch a line learn.14 min
  2. 2Linear regression and lossWhat makes one line fit better than another? Measure the misses, find the best line by hand, and see how the choice of loss decides which line wins.15 min
  3. 3Gradient descentMost models have no formula for their best parameters. They find them by repeatedly stepping downhill on the loss. See how the slope guides each step, and how the step size can make or break training.18 min
  4. 4Better optimizersPlain gradient descent struggles in narrow valleys and on flat ground. Momentum, RMSProp, and Adam fix this with two simple ideas. Race them on the same surfaces.16 min
  5. 5Probability and Bayes' ruleHow likely is something, given what you just saw? Learn conditional probability, why base rates matter, and how a naive Bayes spam filter adds up evidence word by word.18 min
  6. 6Classification and probabilityTo sort things into categories, a model turns a score into a probability. Meet the sigmoid, the cross-entropy loss, and the decision boundary, and train a classifier live.17 min
  7. 7Overfitting and generalizationA model flexible enough to fit anything will happily fit the noise too. See training error and test error split apart, and learn the two standard fixes.17 min
  8. 8Decision treesA decision tree classifies by asking one yes or no question after another. Build one by hand on a classic dataset, watch one grow on its own, and learn when to stop it.20 min
  9. 9Ensembles: forests and boostingMany imperfect models can beat one good one. Grow a random forest from bootstrap samples, then boost small trees that each fix what the earlier ones got wrong.22 min
  10. 10Measuring a classifierAccuracy can be badly misleading. Learn the confusion matrix, precision, recall, and the ROC curve by moving a spam filter's threshold yourself.16 min
  11. 11Finding groups: k-meansNot every dataset comes with answers. k-means finds groups in unlabeled data with two simple alternating steps. Watch it work, and watch it fail.15 min

Labs in this track

Try "embedding", "softmax", "overfitting", or "backpropagation".