Current Units

Machine Learning and the Physical World

The module “Machine Learning and the Physical World” is focused on machine learning systems that interact directly with the real world. Building artificial systems that interact with the physical world have significantly different challenges compared to the purely digital domain. In the real world data is scares, often uncertain and decisions can have costly and irreversible consequences. However, we also have the benefit of centuries of scientific knowledge that we can draw from. This module will provide the methodological background to machine learning applied in this scenario. We will study how we can build models with a principled treatment of uncertainty, allowing us to leverage prior knowledge and provide decisions that can be interrogated.

There are three principle points about machine learning in the real world that will concern us.

  1. We often have a mechanistic understanding of the real world which we should be able to bootstrap to make decisions. For example, equations from physics or an understanding of economics.
  2. Real world decisions have consequences which may have costs, and often these cost functions need to be assimilated into our machine learning system.
  3. The real world is surprising, it does things that you do not expect and accounting for these challenges requires us to build more robust and or interpretable systems.

Decision making in the real world hasn’t begun only with the advent of machine learning technologies. There are other domains which take these areas seriously, physics, environmental scientists, econometricians, statisticians, operational researchers. This course identifies how machine learning can contribute and become a tool within these fields. It will equip you with an understanding of methodologies based on uncertainty and decision making functions for delivering on these challenges.

This unit is taught jointly with Prof. Neil Lawrence.

Advanced Data Science

The Advanced Data Science unit will set the context on the emerging domain of data science and guide students through the data science pipeline. At the end of the course students will be familiar with the purpose of data science, how it differs from the closely related fields of machine learning, statistics and artificial intelligence and what a typical data analysis pipeline looks like in practice. As well as emphasising the importance of analysis methods we will introduce a formalism for organising how data science is done in practice and what the different aspects the data scientist faces when giving data-driven answers to questions of interest.

This unit is taught jointly with Prof. Neil Lawrence.

Probabilistic Numerics - Computation as Statistical Inference

Traditionally machine learning is seen as the task to make statistical inference over some quantitiy of interest from a finite set of measurements of observed variables. In contrast a numerical method aims to take evaluations of computation and return predictions of a quantity of interest of a function. From these two statements it becomes clear that the "only" real difference between the two is what we consider data, measurements of a variable or results of a computation. Probabilistic numerics is the emerging field aiming to put numerical methods on a principled statistical footing allowing us to use think of concepts such as uncertainty in computation to guide decision making and include bias in terms of prior distributions to make computations efficient. This unit aims to introduce the underlying concepts of this exciting field and provide a foundation for further studies.

This material is part of the unit Advanced Topics in Machine Learning given in Lent in the computer lab.


  • Teacher of the year in Computer Science at University of Bristol, 2016
  • Teacher of the year at Royal Institute of Technology, Sweden motivation, 2015
  • Teacher of the year from Student chapter in Industrial Economics at Royal Institute of Technology, 2015
  • Teacher of the year in Computer Science at Royal Institute of Technology, 2012

Previous Units

Machine Learning

Machine learning can seem like a very rapidly moving field, every day there are new applications and it is currently getting an unprecidented attention in the media. This is an exciting time because the solutions it creates are important and it has the possibility to change the way we live in fundamental ways. However, something which might seem surprising is that the methodologies underpinning this rapid progress are centuries old and built on a few important principles. In this unit we focus on the basic and fundamental concepts of learning and in specific formulations of learning that are applicable to machines.

The unit page can be found here and the repository that includes all the material here.

Introduction to Computer Architecture

In order to write efficient code on a computer you need to understand how the underlying structure of execution works. In this unit we will go through, from the bottom up what a computer actually is. The aim is to remove all the magic and in the end hopfully be in a state where we have lost the respect for the computer.

Computer Graphics

Computer Graphics is a topic that encapsulate every aspect of computer science. The visual world is complicated and it is challenging to create physically correct simulations with limited computational resources. Therefore we need to exploit algorithmical properties to reduce computational cost and we need to understand computer architecture and hardware to write efficient programs to aquire data we can exploit machine learning and computer vision. What makes it even more exciting is that we want to create a product to be consumed by humans so by understanding our perception system we can spend computational resources where it matters.

In this unit we focus on the rendering aspects of graphics. We start from an empty page, i.e. with a pointer to a frame buffer. From this we explore and implement two different rendering engines, one focusing on realism while the other on efficiency. The unit page can be found here and the repository that includes all the material here.

Signals Systems and Pattern

This is a unit that tries to introduce data-driven learning. I was prodviding the machine learning part of the unit where I introduced the concepts of learning. How can we formulate explicit assumptions that we can combine with data to create new knowledge.

Amiga Assembler Tutorial

Computer science is the field that studies computation and it has lead to fascinating developments that have fundamentally changed society. A huge part of this is of course down to the rise of the electronic computer which have allowed us rapidly and exactly perform the tasks which are indeed computable. These things are though very interesting in themselves but sadly we see less and less of them in our daily computational tasks. Programming languages have become so abstract that its hard to even understand how and what they actually execute. It is therefore easy to forget the wonderful electronic computer, the marvelous engineering that have fascilitated this progress. To bring back the computer into programming again I designed a tutorial course on Amiga assembler programming. The Amiga is a computer that epitomises creativity, even though its over three decades old there are new developments and discoveries happening every year. This tutorial aims to help those of us who are old to rediscover the fun and to those of you that grew up with computers as a tool and not a fried to discover the creative process that is programmin

Advanced Machine Learning

Machine learning is the study of algorithms that can learn from data. Intelligence can be seen as the capability to act under uncertainty. This course tries to make these two concepts principled and teach the underlying scientific framework namely Bayesian statistics. I gave a third of the lectures in this course focusing on Bayesian modelling, non-parametrics and Kernel methods. The course is suitable for anyone who is interested acquiring a foundation for understanding machine learning algorithms from a unified perspective, learning a basis for developing new novel algorithms and models.

The material in this course is mathematical, the concepts are not advanced, only basic linear algebra and calculus but the course is focused on understanding which means that to get something out from the material will require a certain mathematical maturity.

Low-level Programming and Computer Architecture

This course is focused learning the inner workings of a computer. We start from the real basics trying to explain what actually happens in the electronics when you press a key and build this up to a level where we start abstracting the hardware with operating systems and high-level programming languages. I thoroughly believe that the best way to learn these things is through practice, therefore the course is heavily lab focused where the three labs makes up the dominant part of the course. We use Raspberry Pi computers to do the labs and program the hardware directly by learning ARM assembler. We also do a lab in C where we hack the Linux kernel to extend it with additional functionality.

The course is suitable for anyone who have an interest in low-level computing and does not require any previous background except a genuine interest in computers. I believe that the course is important for anyone who will work with computers in the future, understanding how a computer really works will make you a better programmer even if you will mainly use high-level languages in the future.

Previous Teaching

I worked as a lecturer at the Royal Institute of Technology in Stockholm between 2010-2015 and between 2016-2020 at the University of Bristol.


  • Machine Learning and the Physical World - Lecturer


  • Machine Learning - Lecturer
  • Introduction to Computer Architecture - Lecturer


  • Machine Learning - Lecturer
  • Computer Graphics - Lecturer


  • Machine Learning - Lecturer
  • Computer Graphics - Lecturer
  • MEng individual project - Organiser


  • Computer Graphics - Lecturer
  • Signals Systems and Patterns - Lecturer


  • Low Level Programming and Computer Architecture - Lecturer
  • Advanced Machine Learning - Lecturer
  • Computer Graphics - Lecturer


  • Low Level Programming and Computer Architecture - Lecturer
  • Advanced Machine Learning - Lecturer


  • Low Level Programming and Computer Architecture - Lecturer
  • Degree Project in Machine Learning for Engineering Physics - Project Supervisor
  • Degree Project in Computer Science - Project Supervisor
  • Computer Graphics and Interaction - Guest Lecturer


  • Low Level Programming and Computer Architecture - Lecturer
  • Degree Project in Machine Learning for Engineering Physics - Project Supervisor
  • Degree Project in Computer Science - Project Supervisor
  • Computer Graphics and Interaction - Guest Lecturer


  • Computer Graphics and Interaction - Lecturer
  • Computer Science and Numerical Methods - Lecturer
  • Scientific Visualisation - Lecturer
  • Scientific Programming - Lecturer


  • Scientific Programming - Lecturer