An online graduate-level course in Uncertainty Quantification (UQ), covering propagation of uncertainty through simulation codes, stochastic inversion/calibration of models, and connections to machine-learning.

dr. R.P. Dwight <r.p.dwight@tudelft.nl>
Part of the MSc Aerodynamics Track, TU Delft

This course is an introduction to the numerical-statistical field of "Uncertainty Quantification" (UQ), demonstrated with applications to computational models based on PDEs, especially CFD. The course is taught in an MSc at TU Delft, April-June, but open to all.

Prerequisites: a) a first course on probability/statistics (though we give a brief refresher in Week I), b) a first course in numerical analysis, and c) a familiarity with numerical solution of PDEs. In addition numerical exercises will be done in Python - some programming experience is necessary.

Topics: UQ is a broad heading, and we will cover specifically:

• Propagation of parametric uncertainty through simulation codes;
• Description of random functions with (Gaussian) processes;
• Stochastic inverse problems in the Bayesian framework;
• Numerical methods for high-dimensional propagation/inverse problems;
• Machine-learning as Bayesian inference.
• Validating computer codes with experimental data
• Assimilating experimental data and simulation into a single prediction
In each case we will look at the motivation, problem statement, solution methods, and interpretation of results. An emphasis will be placed throughout on the Bayesian framework for inverse problems.

Structure: The course is normally taught in 7 weeks, structured as follows:

WeekLecturesExercise
0 Introduction and motivation(none)
I Probability refresher/fundamentals(none)
II Polynomial stochastic methods Tutorial 1: Basics
III Multi-dimensions & Sparse grids Tutorial 2: Uncertainty in XFoil
IV Bayes & Gaussian-processes Tutorial 3: Gaussian processes (Kriging)
V Bayes for nonlinear models Tutorial 4: Inverse Poission problem (low-dimensional)
VI Variational methods with adjoints Tutorial 5: Field inversion for Poission
VII Machine-learning as Bayesian inference(none)

For each part of the course there is a programming tutorial, in which the theory is applied. The exercises use Python in Jupyter notebooks. Each should take ~3-6 hours depending strongly on your programming (and Python/numpy) experience. There is also a more involved final project: "RANS model calibration", and should take a few days to complete.

These lectures are the way you should approach the material first. Supporting reading from Smith is listed below each video. Attempt the corresponding tutorial after watching the lectures.
• Week 0: Introduction and motivation
• Week I: Probability refresher/fundamentals
• Week II: Polynomial stochastic methods for propagation in 1d (Tutorial 1)
• Week III: Multiple dimensions & Sparse grids (Tutorial 2)
• Week IV: Bayes theorem & Gaussian-processes (Tutorial 3)
• Week V: Bayes for nonlinear models (Tutorial 4)
• Week VI: Variational methods for inverse problems with adjoints (Tutorial 5)
• Week VII: Machine-learning as Bayesian inference

The five tutorials are in the form of IPython notebooks (with support files):

• Tutorials 1-2: Uncertainty propagation with polynomials, ipynb, xfoil.mat, xfoil.py
• Tutorial 3: Gaussian processes for surrogate modelling, ipynb
• Tutorial 4: Nonlinear inverse problems with McMC, ipynb
• Tutorial 5: High-dimensional inverse problems with adjoints, ipynb, secret.mat.
These can be worked through on your own laptop with a complete scientific Python install (numpy, scipy, ipython, matplotlib, etc.). Installing Anaconda with Python 3 will get you all this, and is recommended.

The tutorials make heavy use of numpy, which is the standard Python module for working with arrays, matrices, etc., and scipy which is the standard Python module for numerical and statistical primitives. If you have used Python, but not numpy before, then I strongly recommend reading:

For those with no programming experience at all - this course may not be for you; but you can try following Codecademy to get a start with Python.

For those taking the course at TU Delft in Q3, deadlines for the tutorials are:
• Tutorial 1 - Friday 18:00, Week 4.4
• Tutorial 2 - Friday 18:00, Week 4.5
• Tutorial 3 - Friday 18:00, Week 4.6
• Tutorial 4 - Friday 18:00, Week 4.7

An (optional) final project is also available at final_project.zip. See the project description for an overview.

In this course we use Ralph C. Smith's Uncertainty quantification: Theory, implementation, and applications, as a supporting text. Please find a copy before the course starts. We don't follow Smith closely, but if Smith covers the material, I will always reference the appropriate section below the corresponding video.

Additional texts for specific parts of the course are:

• On basic Bayesian statistics, Skilling & Sivia's Data Analysis: A Bayesian Tutorial.
• On advanced Bayesian statistics, Gelman's Bayesian Data Analysis.
• On inverse problems, Tarantola's Inverse problem theory.
• On surrogate modelling (especially Kriging) Forrester's, Engineering design via surrogate modelling.
• For an online UQ-programming course, see Bilionis's Introduction to UQ.
For machine-learning aspects of the course:
Approach me for further reading material for specific interests.

I'll be holding interactive classes via Zoom here, on the following dates/times (these are times of the scheduled contact hours):
The idea is that you've already watched the corresponding videos and attempted the tutorial. I'll give a short introduction, and then we'll discuss questions/problems, etc. Feel free to bring other interesting ideas, reading material, and questions related to the topics of the course.

The course will be assessed as:
• 50% 5 weekly tutorials (code only, pass/fail) OR 1 final project (graded report)
• 50% oral exam
All projects may be done alone or in pairs - orals are individual. The oral will be via Zoom (2021), and I may ask questions on any part of the course. I will set aside a week, perhaps Week 4.10 in which orals can be scheduled.

Usually tutorials are due the following week (and I strongly recommend that cadence, to keep up with the material). However this year (2021) there is a touch of disruption to schedules in Q4, therefore tutorials may be sumbitted any time. You may only schedule your oral once all tutorials are submitted.

dr. R. Dwight ≤r.p.dwight@tudelft.nl≥ - April 2021

I've received from lecturers, a few requests for tips on how to make the kind of maths videos seen e.g. here. Since my lectures are quite maths-heavy, I took inspiration on style from Khan academy. I'm using Linux (Ubuntu), but for most of the software below there are Windows/MacOS versions.

Finding a setup that works well was quite a lot of effort, you'll need:

• A tablet - I'm using an old Wacom Bamboo that I inherited from our department secretary.
• A good quality microphone - I'm using the Blue Yeti.
• Drawing/doodling software.
• Screen recording software.
• Video editing software.
The drawing program and screen recorder are completely independent, and generally easy to find. Finding a working video editor was most tricky.

For drawing I just tried a few until I found one I liked. I looked for ones with customizable backgrounds (I wanted black), and keyboard-shortcuts for changing pen, erasing, etc., and found:

My screenrecorder, the only requirement is that it works. Having a keyboard shortcut for starting and stopping saves time editing off the beginning and ends of the videos:

And only after a lot of searching did I find an editor that worked well (some deleted sound, some cut at the wrong place, one took ~1 hour to save a video, all sorts of problems). This one is fine for cutting and combining videos, which is all I need:

And I save the result in MP4 containers, which means they play natively in most (all?) browsers.

A special thanks to the developers of all these tools - this wouldn't have been possible without you!!!