Modelling and Machine Learning
This is a 15hour summer course, offered in July 2023. It introduces machine learning from a probabilistic perspective, starting with elementary probability models and building up to advanced neural networks. It is a condensed version of material taught to secondyear and fourthyear computer science students.
 Lecture notes will be provided in the first lecture. The lecture notes cover more material than can fit into this course; the extra material is there for your curiosity.
 Assessment. There are three assignments. Of these, one will be assessed in a written exam, and one will be assessed in a presentation. The other is not assessed, but you are encouraged to attempt it, and you are welcome to ask for help.
 Slides will be posted here in the morning before each lecture. If you want to prepare, you should read the relevant section from lecture notes.
 Videos that cover much of the same material (but with more examples) can be found on the course website for IB Data Science.
 Prerequisites You should be familiar with basic probability and calculus. Make sure you can answer these exercises, then check your answers. The programming assignments assume you are familiar with Python and numpy. In case you aren't, here's a Python tutorial, a numpy tutorial, and a matplotlib tutorial.
Assignments
 Openbook written exam on 10 August
 Programming project: particle filter [Assessed by presentation on 16 August.]
 Advanced coursework: variational autoencoder [Optional, not assessed.]
Schedule
Session 1 [slides]
(Tue 25 July, 09:00–12:00;
Seminar Room, CUED) 
1, 1.1, 1.2. What is a probability model?
1.3, 1.4. Maximum likelihood estimation; numerical optimization
1.5. Maths notation for specifying models
1.6, 1.7. Generative and supervised modelling

Session 2 [slides]
(Wed 26 July, 09:00–12:00;
Seminar Room, CUED) 
3.1, 3.2. Classification with a neural network
3.3. Optimization using pytorch
3.4. Latent variable generative models
4. Assessing model fit
2. Regression: linear models and feature design

Session 3 [slides]
(Thu 27 July, 09:00–12:00;
Teaching Room, CUED) 
5.1. Bayes's rule
8.1. Bayesianism
6.1, 6.2, 8.2. Monte Carlo integration, computational Bayes's rule
8.3, 8.5. Bayesian readouts
6.3. Importance sampling

Session 4 [slides]
(Mon 31 July, 09:00–12:00;
Seminar Room, CUED) 
6.3, 6.4, 6.5. Variational autoencoders
10.1, 10.2. Overfitting and crossvalidation
12.1, 12.2. Markov chains

Session 5 [slides]
(Tue 1 Aug, 09:00–12:00;
LAB 113, Lord Ashcroft Bldg) 
13.1, 13.2. Learning sequence models
10.1, 10.2. Overfitting and generalizability

Exam
(Thu 10 Aug, 09:00–10:30;
CUED) 
An openbook written exam, testing

Final presentation
(Wed 16 Aug, 09:00–12:00;
UCL Cruciform Bldg room B1.03) 
Present your answers to the Particle Filter programming project

Instructor notes
Instructor notes — ask DJW for access