Skip to content

Commit

Permalink
Update simulation.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lawrennd committed Oct 17, 2023
1 parent ea3448e commit 8f38222
Show file tree
Hide file tree
Showing 30 changed files with 65 additions and 38 deletions.
4 changes: 3 additions & 1 deletion _advds/a-data-science-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ layout: lecture
venue: LT2, William Gates Building
youtube: BfkEg7BTbHA
oldyoutube:
- code: BfkEg7BTbHA
year: 2022
- code: kDOCnZcVEQA
year: 2021
author:
Expand All @@ -19,7 +21,7 @@ author:
twitter: lawrennd
url: http://inverseprobability.com
time: "10:00"
date: 2022-11-04
date: 2023-11-03
transition: None
ipynb: False
---
Expand Down
2 changes: 1 addition & 1 deletion _advds/generalised-linear-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ author:
institute: University of Cambridge
url: http://carlhenrik.com/
time: "10:00"
date: 2022-11-09
date: 2023-11-08
youtube: DgaZQcNp9fU
oldyoutube:
- code: VQvYg3jin-k
Expand Down
4 changes: 3 additions & 1 deletion _advds/introduction-to-statistical-learning.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ author:
institute: University of Cambridge
url: http://carlhenrik.com/
time: "10:00"
date: 2022-11-07
date: 2023-11-06
youtube: KWP58rugi4E
oldyoutube:
- code: KWP58rugi4E
year: 2022
- code: r5WFIloyVx0
year: 2021
pdfslides: advanced-datascience-learning.pdf
Expand Down
4 changes: 2 additions & 2 deletions _advds/practical-one.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ author:
url: http://inverseprobability.com
time: "15:00"
postsdir: ../../../mlatcl/advds/_practicals/
date: 2022-11-01
date: 2023-10-31
transition: None
reveal: false
ipynb: true
Expand All @@ -33,7 +33,7 @@ ipynb: true
<!-- have students use AWS details we provided -->
\define{awsSignUp}

\notes{Check Session for this Practical is 3rd November 2022}
\notes{Check Session for this Practical is 2nd November 2023}

\define{databaseType}{mariadb}
\include{_systems/includes/nigeria-nmis-installs.md}
Expand Down
4 changes: 2 additions & 2 deletions _advds/practical-three.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ author:
institution: University of Cambridge
url: http://carlhenrik.com
time: "15:00"
date: 2022-11-08
date: 2023-11-07
postsdir: ../../../mlatcl/advds/_practicals/
pdfworksheet: practical-three.pdf
transition: None
reveal: false
ipynb: false
---

\notes{Check Session for this Practical is 15th November 2022}
\notes{Check Session for this Practical is 14th November 2023}

4 changes: 2 additions & 2 deletions _advds/practical-two.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ author:
twitter: lawrennd
url: http://inverseprobability.com
postsdir: ../../../mlatcl/advds/_practicals/
date: 2022-11-03
date: 2023-11-02
transition: None
reveal: false
ipynb: true
---

\notes{Check Session for this Practical is 8th November 2022}
\notes{Check Session for this Practical is 7th November 2023}

\subsection{Revert Matplotlib Version}

Expand Down
2 changes: 1 addition & 1 deletion _advds/review-and-refresher-II.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ author:
twitter: lawrennd
url: http://inverseprobability.com
postsdir: ../../../mlatcl/advds/_practicals/
date: 2022-11-08
date: 2023-11-07
transition: None
reveal: false
ipynb: true
Expand Down
2 changes: 1 addition & 1 deletion _advds/review-and-refresher.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ author:
twitter: lawrennd
url: http://inverseprobability.com
postsdir: ../../../mlatcl/advds/_practicals/
date: 2022-10-28
date: 2023-10-27
transition: None
reveal: false
ipynb: true
Expand Down
2 changes: 1 addition & 1 deletion _advds/the-challenges-of-data-science-II.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ youtube: jdrw3kW0J18
oldyoutube:
- code: t0819B2kboc
year: 2021
date: 2022-11-02
date: 2023-11-01
transition: None
ipynb: false
---
Expand Down
4 changes: 3 additions & 1 deletion _advds/the-challenges-of-data-science.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ author:
twitter: lawrennd
url: http://inverseprobability.com
oldyoutube:
- code: BQKfIJHPiCQ
year: 2022
- code: KXnZ4nj-ahA
year: 2021
youtube: BQKfIJHPiCQ
time: "10:00"
date: 2022-10-31
date: 2023-10-30
transition: None
ipynb: false
---
Expand Down
4 changes: 3 additions & 1 deletion _advds/the-data-science-landscape.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ author:
time: "10:00"
youtube: IGRecWhh2Mo
oldyoutube:
- code: IGRecWhh2Mo
year: 2022
- code: j1MjFd_2U80
year: 2021
date: 2022-10-28
date: 2023-10-27
transition: None
ipynb: false
---
Expand Down
7 changes: 5 additions & 2 deletions _advds/visualisation-ii.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
week: 6
session: 2
featured_image: assets/images/visualisation-ii.png
title: "Statistical Learning Outlook"
title: "Visualisation II"
abstract: >
layout: lecture
venue: LT2, William Gates Building
Expand All @@ -13,8 +13,11 @@ author:
institute: University of Cambridge
url: http://carlhenrik.com/
time: "10:00"
date: 2022-11-14
date: 2023-11-13
youtube: ifouo8ZDOjU
oldyoutube:
- code: ifouo8ZDOjU
year: 2022
pdfslides: advanced-data-science-visualisation-II.pdf
reveal: false
ipynb: false
Expand Down
2 changes: 1 addition & 1 deletion _advds/visualisation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ author:
institute: University of Cambridge
url: http://carlhenrik.com/
time: "10:00"
date: 2022-11-11
date: 2023-11-10
youtube: hUI-nV0uyv4
oldyoutube:
- code: hUI-nV0uyv4
Expand Down
1 change: 1 addition & 0 deletions _ai/includes/human-analogue-machines.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

\editme

\include{_simulation/includes/the-moniac.md}
\include{_ai/includes/donald-mackay-brain.md}

\subsection{Human Analogue Machine}
Expand Down
13 changes: 13 additions & 0 deletions _books/includes/the-atomic-human.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
\ifndef{theAtomicHuman}
\define{theAtomicHuman}

\editme

\notes{\section{The Atomic Human}}

\newslide{}

\figure{\includejpg{\diagramsDir/books/the-atomic-human}{40%}}{[The Atomic Human](https://www.amazon.co.uk/dp/B0CGZHBSLL)}{the-atomic-human}


\endif
2 changes: 0 additions & 2 deletions _ml/data-science-and-digital-systems-three-ds.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ papersize: a4paper
transition: None
---

\include{talk-macros.tex}

\section{Introduction}

\include{_data-science/includes/gartner-hype-cycle-ai-bd-dm-dl-ml.md}
Expand Down
2 changes: 1 addition & 1 deletion _mlphysical/bayesian-optimisation.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ oldyoutube:
- code: zVXJ238j5KM
year: 2021
time: "12:00"
date: 2023-10-24
date: 2023-10-26
---

Related publications and links will appear here.
2 changes: 1 addition & 1 deletion _mlphysical/emukit-and-experimental-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ author:
url: http://inverseprobability.com
layout: lecture
time: "12:00"
date: 2023-10-31
date: 2023-11-02
ipynb: true
reveal: true
youtube: RtwVraTI5lU
Expand Down
2 changes: 1 addition & 1 deletion _mlphysical/emulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ author:
url: http://inverseprobability.com
layout: lecture
time: "12:00"
date: 2023-10-19
date: 2023-10-24
youtube: Zw2es1Khu_c
oldyoutube:
- code: Zw2es1Khu_c
Expand Down
2 changes: 1 addition & 1 deletion _mlphysical/gaussian-processes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ author:
twitter:
gscholar:
orchid:
date: 2022-10-12
date: 2023-10-12
time: "12:00"
week: 2
session: 1
Expand Down
1 change: 1 addition & 0 deletions _mlphysical/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ oldyoutube:
year: 2020
time: "12:00"
featured_image: /slides/diagrams/ceres/giuseppe-piazzi.png
pdfslides: l48-mlpw-01.pdf
date: 2023-10-05
transition: None
ipynb: true
Expand Down
2 changes: 1 addition & 1 deletion _mlphysical/multifidelity.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ author:
url: http://inverseprobability.com
layout: lecture
time: "12:00"
date: 2023-11-07
date: 2023-11-09
youtube: vZ1uBlyoX6w
oldyoutube:
- code: vZ1uBlyoX6w
Expand Down
2 changes: 1 addition & 1 deletion _mlphysical/probabilistic-numerics.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ author:
twitter:
gscholar:
orcid:
date: 2023-10-26
date: 2023-10-31
time: "12:00"
week: 4
session: 1
Expand Down
2 changes: 1 addition & 1 deletion _mlphysical/projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ author:
url: http://carlhenrik.com
layout: lecture
time: "12:00"
date: 2023-11-09
date: 2023-11-14
ipynb: False
pdfslides: l48-mlpw-projects.pdf
reveal: False
Expand Down
2 changes: 1 addition & 1 deletion _mlphysical/sensitivity-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ author:
url: http://inverseprobability.com
layout: lecture
time: "12:00"
date: 2022-11-02
date: 2023-11-07
ipynb: True
reveal: True
youtube: HbtFVqVy5yI
Expand Down
23 changes: 13 additions & 10 deletions _mlphysical/simulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ But while Gaussian processes are highly flexible non-parametric function models,

\speakernotes{Precise physical laws are predictive of the future. Met office super computer uses 1 km grids cells to compute the weather.}

\notes{We've already reviewed the importance of Newton's laws in forging our view of science: we mentioned the influence [Christiaan Huygens'](https://en.wikipedia.org/wiki/Christiaan_Huygens) work on collisions had on Daniel Bernoulli in forming the kinetic theory of gases. These ideas inform many of the physical models we have today around a number of natural phenomena. The MET Office supercomputer in Exeter spends its mornings computing the weather across the world its afternoons modelling climate scenarios. It uses the same set of principles that Newton described and Bernoulli explored for gases. They are encoded in the Navier-Stokes equations. Differential equations that govern the flow of compressible and incompressible fluids. As well as predicting our weather, these equations are used in fluid dynamics models to understand the flight of aircraft, the driving characteristics of racing cars and the efficiency of gas turbine engines.
\notes{We've already reviewed the importance of Newton's laws in forging our view of science: we mentioned the influence [Christiaan Huygens'](https://en.wikipedia.org/wiki/Christiaan_Huygens) work on collisions had on Daniel Bernoulli in forming the kinetic theory of gases. These ideas inform many of the physical models we have today around a number of natural phenomena. The MET Office supercomputer in Exeter spends its mornings computing the weather across the world its afternoons modelling climate scenarios. It uses the same set of principles that Newton described, and Bernoulli explored for gases. They are encoded in the Navier-Stokes equations. Differential equations that govern the flow of compressible and incompressible fluids. As well as predicting our weather, these equations are used in fluid dynamics models to understand the flight of aircraft, the driving characteristics of racing cars and the efficiency of gas turbine engines.

This broad class of physical models, or 'natural laws' is probably the closest to what Laplace was referring to in the demon. The search for unifying physical laws that dictate everything we observe around us has gone on. Alongside Newton we must mention James Clerk Maxwell, who unified electricity and magnetism in one set of equations that were inspired by the work and ideas of Michael Faraday. And still today we look for unifying equations that bring together in a single mathematical model the 'natural laws' we observe. One equation that for Laplace would be "all forces that set nature in motion". We can think of this as our first time of physical model, a 'precise model' of the known laws of our Universe, a model where we expect that the mapping from the mathematical abstraction to the physical reality is 'exact'.[^exact]

Expand Down Expand Up @@ -164,15 +164,15 @@ This broad class of physical models, or 'natural laws' is probably the closest t

\subsection{Molecular Dynamics Simulations}

\notes{By understanding and simulating the physics, we can recreate operations that are happening at the level of proteins in the human cell. [V-ATPase](https://en.wikipedia.org/wiki/V-ATPase) is an enzyme that pumps protons. But at the microscopic level it's a small machine. It produces ATP in response to a proton gradient. A recent paper in *Science Advances* [@Roh-cryo-em20] simulates the functioning of these proteins that operate across the cell membrane. This makes these proteins difficult to crystallize, the response to this challenge is to use a simulation which (somewhat) abstracts the processes. You can also check this [blog post](https://www6.slac.stanford.edu/news/2020-10-07-first-detailed-look-how-molecular-ferris-wheel-delivers-protons-cellular-factories) from the paper's press release.}
\notes{By understanding and simulating the physics, we can recreate operations that are happening at the level of proteins in the human cell. [V-ATPase](https://en.wikipedia.org/wiki/V-ATPase) is an enzyme that pumps protons. But at the microscopic level it's a small machine. It produces ATP in response to a proton gradient. A paper in *Science Advances* [@Roh-cryo-em20] simulates the functioning of these proteins that operate across the cell membrane. This makes these proteins difficult to crystallize, the response to this challenge is to use a simulation which (somewhat) abstracts the processes. You can also check this [blog post](https://www6.slac.stanford.edu/news/2020-10-07-first-detailed-look-how-molecular-ferris-wheel-delivers-protons-cellular-factories) from the paper's press release.}

\figure{\includegif{\diagramsDir/sysbio/rotary_proton_sv_pump_anim_final}{40%}}{The V-ATPase enzyme pumps proteins across membranes. This molecular dynamics simulation was recently published in *Science Advances* [@Roh-cryo-em20]. The scale is roughly $10^{-8} m$.}{v-atp-ase}
\figure{\includegif{\diagramsDir/sysbio/rotary_proton_sv_pump_anim_final}{40%}}{The V-ATPase enzyme pumps proteins across membranes. This molecular dynamics simulation was published in *Science Advances* [@Roh-cryo-em20]. The scale is roughly $10^{-8} m$.}{v-atp-ase}

\speakernotes{Those complex interactions can also be modelled, but we can no longer summarize with the Maxwell-Boltzmann distribution. We need molecular dynamics simulations which can be combined with imaging using electron microscopes operating at extremely cold temperatures.}

\subsection{Quantum Mechanics}

\notes{Alternative we can drop down a few scales and consider simulation of the Schrödinger equation. A recent paper uses deep neural networks to speed up the solution of the many-electron Schrödinger equation enabling simulation of chemical bonds [@Pfau-abinitio20]. The [PR-blog post is also available](https://deepmind.com/blog/article/FermiNet). The paper uses a neural network to model the quantum state of a number of electrons.}
\notes{Alternatively, we can drop down a few scales and consider simulation of the Schrödinger equation. Intractabilities in the many-electron Schrödinger equation have been addressed using deep neural networks to speed up the solution enabling simulation of chemical bonds [@Pfau-abinitio20]. The [PR-blog post is also available](https://deepmind.com/blog/article/FermiNet). The paper uses a neural network to model the quantum state of a number of electrons.}

\figure{\includegif{\diagramsDir/physics/many-electron-schroedinger}{40%}}{The many-electron Schrödinger equation is important in understanding how Chemical bonds are formed.}{many-electron-schroedinger}

Expand All @@ -190,7 +190,7 @@ These properties cannot be predicted without running the physics, or the equival

\notes{We now have four fellows appointed, each of whom works at the interface of machine learning and scientific discovery. They are using the ideas around machine learning modelling to drive their scientific research.}

\notes{For example, [Bingqing Cheng](https://sites.google.com/site/tonicbq/), one of the Department's former DECAF Fellows has used neural network accelerated molecular dynamics simulations to understand a new form of metallic hydrogen, likely to occur at the heart of stars [@Cheng-evidence20]. The University's [press release is here](https://www.cam.ac.uk/research/news/ai-shows-how-hydrogen-becomes-a-metal-inside-giant-planets).}
\notes{For example, [Bingqing Cheng](https://acceleratescience.github.io/team/bingqing-cheng.html), one of the Department's former DECAF Fellows has used neural network accelerated molecular dynamics simulations to understand a new form of metallic hydrogen, likely to occur at the heart of stars [@Cheng-evidence20]. The University's [press release is here](https://www.cam.ac.uk/research/news/ai-shows-how-hydrogen-becomes-a-metal-inside-giant-planets).}

\notes{On her website Bingqing quotes Paul Dirac.}

Expand All @@ -204,13 +204,14 @@ These properties cannot be predicted without running the physics, or the equival
>
>--- Paul Dirac (6 April 1929)
\notes{Bingqing has now taken a position at IST Austria, our other DECAF fellows are [Challenger Mishra](https://oatml.cs.ox.ac.uk/members/challenger_mishra/), a physicist interested in string theory and quantizing gravity. [Sarah Morgan](https://www.neuroscience.cam.ac.uk/directory/profile.php?SarahMorgan) from the Brain Mapping Unit, who is focused on predicting psychosis trajectories and [Bianca Dumitrascu](https://b2du.github.io/) who focuses on the interface of machine learning and biology with particular interests in emergent behavior in complex systems.}
\notes{Bingqing has now taken a position at IST Austria, our other DECAF fellows are [Challenger Mishra](https://acceleratescience.github.io/team/challenger-mishra.html), a physicist interested in string theory and quantizing gravity. [Sarah Morgan](https://acceleratescience.github.io/team/sarah-morgan.html) from the Brain Mapping Unit, who is focused on predicting psychosis trajectories, [Soumya Bannerjee](https://acceleratescience.github.io/team/soumya-banerjee.html) who focuses on complex systems and healthcare and [Sam Nallaperuma](https://acceleratescience.github.io/team/sam-nallaperuma.html) who the interface of machine learning and biology with particular interests in emergent behavior in complex systems.}

\newslide{Accelerate Fellows}

\slides{* Bianca Dumitrascu
* Challenger Mishra
* Sarah Morgan}
\slides{* Challenger Mishra
* Sarah Morgan
* Soumya Banerjee
* Sam Nallaperuma}

\notes{For those interested in Part III/MPhil projects, you can see their project suggestions on [this page](https://mlatcl.github.io/internal/projects/).}

Expand All @@ -234,12 +235,14 @@ These properties cannot be predicted without running the physics, or the equival

This is the objective of probabilistic programming. The idea is that you write your model in a language, and that language is automatically converted into the different modelling codes you need to perform Bayesian inference.

The ideas for probabilistic programming originate in [BUGS](https://www.mrc-bsu.cam.ac.uk/software/bugs/). The software was developed at the MRC Biostatistics Unit here in Cambridge in the early 1990s, by among others, David Spiegelhalter. Carl Henrik covered in last week's lecture some of the approaches for approximate inference. BUGS uses Gibbs sampling. Gibbs sampling, however, can be slow to converge when there are strong correlations in the posterior between variables.
The ideas for probabilistic programming originate in [BUGS](https://www.mrc-bsu.cam.ac.uk/software/bugs/). The software was developed at the MRC Biostatistics Unit here in Cambridge in the early 1990s, by among others, [Sir David Spiegelhalter](https://en.wikipedia.org/wiki/David_Spiegelhalter). Carl Henrik covered in last week's lecture some of the approaches for approximate inference. BUGS uses Gibbs sampling. Gibbs sampling, however, can be slow to converge when there are strong correlations in the posterior between variables.

The descendent of BUGS that is probably most similar in the spirit of its design is [Stan](https://mc-stan.org/). Stan came from researchers at Columbia University and makes use of a variant of Hamiltonian Monte Carlo called the No-U-Turn sampler. It builds on automatic differentiation for the gradients it needs. It's all written in C++ for speed, but has interfaces to Python, R, Julia, MATLAB etc. Stan has been highly successful during the Coronavirus pandemic, with a number of epidemiological simulations written in the language, for example see this [blog post](https://mc-stan.org/users/documentation/case-studies/boarding_school_case_study.html).}

\notes{Other probabilistic programming languages of interest include those that make use of variational approaches (such as [pyro](https://pyro.ai/)) and allow use of neural network components.}

\notes{One important probabilistic programming language being developed is [Turing](https://turinglang.org/stable/), one of the key developers is [Hong Ge](https://mlg.eng.cam.ac.uk/hong/) who is a Senior Research Associate in Cambridge Engineering.}

\subsection{Approximate Bayesian Computation}

\notes{We reintroduced Gaussian processes at the start of this lecture by sampling from the Gaussian process and matching the samples to data, discarding those that were distant from our observations. This approach to Bayesian inference is the starting point for *approximate Bayesian computation* or ABC.}
Expand Down
2 changes: 1 addition & 1 deletion _software/includes/notutils-software.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
\notes{\subsection{notutils}}


\notes{This small package is a helper package for various notebook utilities used}
\notes{This small package is a helper package for various notebook utilities used below.}

\notes{The software can be installed using}

Expand Down
File renamed without changes.
Binary file added slides/diagrams/ai/atomic-eye.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/diagrams/books/the-atomic-human.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8f38222

Please sign in to comment.