A First Course in Machine Learning

My own study notes, exercise solutions and interactive visualisations for A First Course in Machine Learning by Simon Rogers and Mark Girolami, with Python ports of the MATLAB examples. Work in progress. The book itself is not included here: please get a copy from the publisher.

I used AI heavily to help me understand the book. The derivations and explanations are mostly AI-written in response to the questions I asked while studying, so they are not in my own words, and they may contain mistakes.

Where to start

Chapter 1: Linear modelling, a least-squares approach

Fitting a line

Mathematical background

Chapter 2: Linear modelling from a probabilistic view

The noise model and the likelihood

The shape of the likelihood

Model complexity and uncertainty

Another example: the Bernoulli parameter

Chapter 3: The Bayesian approach

Overview

The coin example: beta prior, binomial likelihood

Gaussian prior and Gaussian likelihood

Chapter 4: Bayesian inference

Overview

The running example: the binary response model

Prior, likelihood and the unnormalised posterior

MAP and Newton–Raphson

Laplace approximation

Sampling: Metropolis–Hastings

Exercises

Chapter 5: Classification

Overview

Gaussian class-conditional densities

Exercises

Chapter 6: Clustering

Overview

Chapter 7: Principal components analysis and latent variable models

Overview