Generalization and Bayesian Introduction

For this week the lecture slides are available here

Assignment 1 is also now available.

YouTube Videos

There is a YouTube video available of me giving this material at the Gaussian Process Road Show in Uganda. The first 25 minutes leads covers model selection, and then it leads into the video second below which introduces Bayesian modelling.

GPRS Uganda Video

First 25 minutes leads into the video below. The first 46 minutes is covering material from this week’s lecture.

Introduction to Bayesian Modelling Video

Lab Class

The notebook for the lab class can be downloaded from here.

To obtain the lab class in ipython notebook, first open the ipython notebook. Then paste the following code into the ipython notebook

import urllib
urllib.urlretrieve('', 'MLAI_lab3.ipynb')

You should now be able to find the lab class by clicking File->Open on the ipython notebook menu.


  • Sections 1.5-1.6 of Rogers and Girolami.
  • Sections 3.1-3.4 (pg 95-117) Although you haven’t covered the beta density yet.
  • Section 1.2.3 (pg 21-24) and 1.2.6 (start from just past eq 1.64 pg 30-32) of Bishop
  • Section 1.3 of Bishop (pg 32-33)

Learning Outcomes Week 3

  • Understand the challenge of model selection.
  • Understand the difference between training set, test set and validation set.
  • Understand and be able to apply appropriately the following approaches to model validation:
    • hold out set,
    • leave one out cross validation,
    • k-fold cross validation.
  • Be able to identify the type of error that arises from bias and the type of error that arises from variance.
  • Be able to distinguish between different types of uncertainty: aleatoric and epistemic. Be able to give examples of each type.
  • Be able to derive Bayes rule’ from the product rule of probability.
  • Understand the meaning of the terms prior, posterior and marginal likelihood
    • Be able to identify these terms in Bayes’ rule.
    • Be able to describe what each of these terms represents (belief before observation, belief after observation, relationship between belief and observation, the model score.)
  • Understand how to derive the marginal likelihood from the likelihood and the prior.
  • Understand the difference between the frequentist approach and the Bayesian approach, i.e. that in the Bayesian approach parameters are treated as random variables
  • Be able to derive the maths to perform a simple Bayesian update on the offset parameter of a regression problem.