Course / 02

Machine Learning

How a program learns a rule from examples and how to tell whether it will work on new data: from a line through points to gradient boosting and neural networks. Each note either fixes a limitation of the previous method or changes the task, and says which.

Before you start: the Probability Theory course, or at least expectation, conditional probability and maximum likelihood; vectors, matrix products and derivatives; reading short NumPy code. Every note ends with a Code section that runs as written. Learning Without Labels and Beyond Classification branch off the supervised route: they change the task rather than replace a classifier.

The course map → · The course in one paragraph →

  1. Learning problem
  2. Linear models
  3. Classification
  4. Trees and ensembles
  5. Neural networks
  6. No labels
  7. Ranking
  1. 01

    The Learning Problem

    What it means to learn from examples, and how to know it worked.

    After this section: Define the loss, the split and a baseline before fitting, and spot leakage in a pipeline.

    4 of 4 notes published
  2. 02

    Linear Regression

    A linear model fitted by formula and by descent, without fitting the noise.

    After this section: Fit a linear model in closed form and by gradient descent, keeping the population target, the empirical loss, the optimizer and generalization apart.

    4 of 4 notes published
  3. 03

    Linear Classification

    Separating classes with a hyperplane, and measuring the errors that matter.

    After this section: Tell a score from a probability and a calibrated probability from a threshold, and choose a metric that matches the cost of errors.

    6 of 6 notes published
  4. 04

    Trees and Ensembles

    Nonlinear models from simple rules, and why averaging and boosting them works.

    After this section: Explain what a tree can express, why averaging trees lowers variance and how boosting fits what the ensemble still gets wrong.

    4 of 4 notes published
  5. 05

    Neural Networks

    Learning the features together with the model.

    After this section: Trace one forward and backward pass by hand and diagnose a training curve that fails.

    3 of 3 notes published
  6. 06

    Learning Without Labels

    Structure in data when there is no target.

    After this section: A change of task: find clusters, mixtures, low-dimensional structure and anomalies when there is no target.

    4 of 4 notes published
  7. 07

    Beyond Classification

    When the answer is an order or a recommendation.

    After this section: Another change of task: learn an order or a recommendation, with metrics and splits that match how the list is used.

    2 of 2 notes published