Mathematics for Machine Learning

Module aims

In this module you will have the opportunity to:

  • be provided with the necessary mathematical background and skills in order to understand, design and implement modern statistical machine learning methodologies, as well as inference mechanisms
  • be provided with examples regarding the use of mathematical tools for the design of foundational machine learning and inference methodologies, such as Principal Component Analysis (PCA), Bayesian Linear Regression and Support Vector Machines   

Learning outcomes

Upon successful completion of this module you will be able to:

  • implement foundational machine learning algorithms from scratch
  • apply appropriate mathematical techniques in a machine learning setting
  • critically assess the quality of machine learning models
  • evaluate connections between different machine learning algorithms

Module syllabus

Bayesian Linear Regression

  • Vector Calculus (e.g., partial derivatives, chain rule, Jacobian)

Basic probability distributions (e.g., multivariate Gaussian)

  • Bayes’ theorem
  • Conjugate priors
  • Gradient descent
  • Model selection
  • Cross validation
  • Maximum likelihood estimation
  • MAP estimation
  • Bayesian integration
  • Graphical model notation
  • Bayesian linear regression Probabilistic PCA
  • Eigenvalues
  • Determinants
  • Basis change
  • Singular value decomposition
  • Gram-Schmidt Orthonormalisation
  • Rotations
  • Projections

Support Vector Machines

  • Constrained optimisation
  • Lagrange multipliers   


The contents of COMP50008 Mathematics 2: Probability and Statistics.

Teaching methods

We will provide the mathematical foundations for deriving and understanding foundational machine learning algorithms. You will obtain a deeper understanding of the application of foundational mathematics (probability theory, statistics, vector caculus, optimisation, linear algebra) to foundational machine learning algorithms. The material is taught mostly through traditional lectures, backed up by assessed exercises (parts of which will be programming exercises) and tutorials, designed to reinforce the material as it is taught. Tutorials are run by Graduate Teaching Assistants (GTAs) and are designed to reinforce your understanding of the key topics taught.

The Piazza Q&A web service will be used as an open online discussion forum for the module.   


There will be one coursework that contributes 30% of the mark for the module. There will be a final written exam, which counts for the remaining 70% of the marks.

Written and verbal feedback will be provided to students throughout the module. Detailed written feedback will be provided on the coursework. Cohort feedback will be provided after the exam.       

Reading list

Core Reading

Supplementary Reading

Module leaders

Dr Yingzhen Li
Dr Mark van der Wilk