Aalto 2021 course will be completely online (pre-recorded lectures, live zoom QA sessions, course chat, online TA sessions, assignments and project submitted online, project presentation online). The registration for the course lectures will be used to estimate the need for the online resources. If you are unable to register for the course at the moment in the Sisu, there is no need to email the lecturer. You can start taking the course and register before the end of the course. Sisu shows rooms on campus for the computer exercises, but all the computer exercises and TA sessions are online. You can choose which TA session to join each week separately, without a need to register for those sessions.
All the course material is available in a git repo (and these pages are for easier navigation). All the material can be used in other courses. Text and videos licensed under CC-BY-NC 4.0. Code licensed under BSD-3.
The material will be updated during the course. Exercise instructions and slides will be updated at latest on Monday of the corresponding week. The updated material will appear on the web pages, or you can clone the repo and pull before checking new material. If you don’t want to learn git, you can download the latest zip file.
Prerequisites
- Basic terms of probability theory
- Some algebra and calculus
- Basic visualisation techniques (R or Python)
This course has been designed so that there is strong emphasis in computational aspects of Bayesian data analysis and using the latest computational tools.
If you find BDA3 too difficult to start with, I recommend
Communication channels
- MyCourses is used for important announcements, linking to Zulip and Peergrade, and some questionnaires.
- The primary communication channel is the Zulip course chat (link in MyCourses)
- Don’t ask via email or direct messages. By asking via common streams in the course chat, more eyes will see your question, it will get answered faster and it’s likely that other students benefit from the answer.
- Login with Aalto account to the Zulip course chat
- If you have any questions, please ask in the public streams and get answers from course staff or other students (active students helping others will get bonus points)
- In the chat system, we will have separate streams for each assignment and the project.
- Stream #general can be used for any kind of general discussions and questions related to the course.
- All important announcements will be posted to #announcements (no discussion on this stream).
- Any kind of feedback is welcome on stream #feedback.
- We have also streams #r, #python, and #stan for questions that are not specific to assignments or the project.
- Stream #queue is used as a queue for getting help during TA sessions.
- The lecturer and teaching assistants have names with “(staff)” or “(TA)” in the end of their names.
- A weekly Q&A session with the lecturer happens in Zoom webinar (see times below, link in MyCourses)
- Q&A session assumes you have self studied at least some of the material before the session
- Q&A session will remind about the important announcements
- Zoom webinar polls, Q&A feature, chat, and audio talking will be used for interaction
- Zoom webinar polls don’t show up in browser zoom client! If you want to see the polls and the poll results, install a desktop client.
- The form of the Q&A session will develop based on the feedback from the students
- Q&A session is not recorded, but the answers to most relevant questions will be shared or short additional videos will be recorded
- If you need one-to-one help, please take part in the TA sessions and ask there.
- If you find errors in material, post in #feedback stream or submit an issue in github.
- Peergrade alerts: If you are worried that you forget the deadlines, you can set peergade to send you email when assignment opens for submission, 24 hours before assignment close for submission, assignment is open for reviewing, 24 hours before an assignment closes for reviewing if you haven’t started yet, someone likes my feedback (once a day). Click your name -> User Settings to choose which alerts you want.
Schedule 2021
The course consists of 12 blocks in periods I and II. The blocks don’t match exactly specific weeks. For example, it’s good start reading the material for the next block while making the assignment for one block. There are 9 assignments and a project work with presentation, and thus the assignments are not in one-to-one correspondence with the blocks. The schedule below lists the blocks and how they connect to the topics, book chapters and assignments.
Schedule overview
Here is an overview of the schedule. Scroll down the page to see detailed instructions for each block. Remember that blocks are overlapping so that when you are working on assignment for one block, you should start watching videos and reading text for the next block.
|
1. Introduction |
BDA3 Chapter 1 |
Computational probabilistic modeling, Introduction to uncertainty and modelling, Introduction to the course contents |
Assignment 1, Rubric questions |
13.9. |
19.09. |
|
2. Basics of Bayesian inference |
BDA3 Chapter 1, BDA3 Chapter 2 |
Lecture 2.1, Lecture 2.2, Optional: Extra explanations 2, Summary 2.1, Summary 2.2, Summary 2.3 |
Assignment 2, Rubric questions |
20.9. |
26.9. |
|
3. Multidimensional posterior |
BDA3 Chapter 3 |
Lecture 3 |
Assignment 3, Rubric questions |
27.9. |
3.10. |
|
4. Monte Carlo |
BDA3 Chapter 10 |
Lecture 4.1, Lecture 4.2 |
Assignment 4, Rubric questions |
4.10. |
10.10. |
|
5. Markov chain Monte Carlo |
BDA3 Chapter 11 |
Lecture 5.1, Lecture 5.2 |
Assignment 5, Rubric questions |
11.10. |
17.10. |
|
6. Stan, HMC, PPL |
BDA3 Chapter 12 + extra material on Stan |
Lecture 6.1, Lecture 6.2 |
Assignment 6, Rubric questions |
18.10. |
31.10. |
|
7. Hierarchical models and exchangeability |
BDA3 Chapter 5 |
Lecture 7.1, Lecture 7.2 |
Assignment 7, Rubric questions |
1.11. |
14.11. |
|
8. Model checking & cross-validation |
BDA3 Chapter 6, BDA3 Chapter 7, Visualization in Bayesian workflow, Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC |
Lecture 8.1, Lecture 8.2 |
Start project work |
8.11. |
N/A |
|
9. Model comparison and selection |
BDA3 Chapter 7 (not 7.2 and 7.3), Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC |
Lecture 9.1, Optional: Lecture 9.2, Lecture 9.3 |
Assignment 8, Rubric questions |
15.11. |
21.11. |
|
10. Decision analysis |
BDA3 Chapter 9 |
Lecture 10.1 |
Assignment 9, Rubric questions |
22.11. |
28.11. |
|
11. Normal approximation, frequency properties |
BDA3 Chapter 4 |
Lecture 11.1, Lecture 11.2 |
Project work |
29.11. |
N/A |
|
12. Extended topics |
Optional: BDA3 Chapter 8, BDA3 Chapter 14-18, BDA3 Chapter 21 |
Optional: Lecture 12.1, Lecture 12.2 |
Project work |
7.12 |
6.12. |
|
13. Project evaluation |
|
|
|
Project presentations: 13-17.12. |
Evaluation week |
1) Course introduction, BDA 3 Ch 1, prerequisites assignment
Course practicalities, material, assignments, project work, peergrading, QA sessions, TA sessions, prerequisites, chat, etc.
- Login with Aalto account to the Zulip course chat with link in MyCourses
- Signin to Peergrade with link in MyCourses
- Watch videos
- Introduction/practicalities lecture and Q&A Monday 13.9. 14:15-16
- Zoom webinar link will be posted to the course chat and MyCourses
- Read BDA3 Chapter 1
- There are no R/Python demos for Chapter 1
- Make and submit Assignment 1. Deadline Sunday 19.9. 23:59
- We highly recommed to submit all assignments Friday before 3pm so that you can get TA help before submission. As the course has students who work weekdays (e.g. FiTech students), the late submission until Sunday night is allowed, but we can’t provide support during the weekends.
- this assignment checks that you have sufficient prerequisite skills (basic probability calculus, and R or Python)
- General information about assignments
- Get help in TA sessions 15.9 12-16, 16.9 12-14, 17.9 12-14
- in Sisu these are marked as exercise sessions, but we call them TA sessions
- these are optional and you can choose which one to join
- see more info about TA sessions
- Optional: Make BDA3 exercises 1.1-1.4, 1.6-1.8 (model solutions available for 1.1-1.6)
- Start reading Chapters 1+2, see instructions below
2) BDA3 Ch 1+2, basics of Bayesian inference
BDA3 Chapters 1+2, basics of Bayesian inference, observation model, likelihood, posterior and binomial model, predictive distribution and benefit of integration, priors and prior information, and one parameter normal model.
- Read BDA3 Chapter 2
- Watch videos Lecture 2.1 and Lecture 2.2 on basics of Bayesian inference, observation model, likelihood, posterior and binomial model, predictive distribution and benefit of integration, priors and prior information, and one parameter normal model. BDA3 Ch 1+2.
- Optional summary videos:
- Read the additional comments for Chapter 2
- Q&A Monday 20.9. 14:15-16
- There may be additional videos recorded based on Q&A
- Check R demos or Python demos for Chapter 2
- Make and submit Assignment 2. Deadline Sunday 26.9. 23:59
- Optional: Make BDA3 exercises 2.1-2.5, 2.8, 2.9, 2.14, 2.17, 2.22 (model solutions available for 2.1-2.5, 2.7-2.13, 2.16, 2.17, 2.20, and 2.14 is in course slides)
- Start reading Chapter 3, see instructions below
3) BDA3 Ch 3, multidimensional posterior
Multiparameter models, joint, marginal and conditional distribution, normal model, bioassay example, grid sampling and grid evaluation. BDA3 Ch 3.
- Read BDA3 Chapter 3
- Watch Lecture 3 on multiparameter models, joint, marginal and conditional distribution, normal model, bioassay example, grid sampling and grid evaluation. BDA3 Ch 3.
- Read the additional comments for Chapter 3
- Q&A Monday 27.9. 14:15-16
- Check R demos or Python demos for Chapter 3
- Make and submit Assignment 3. Deadline Sunday 3.10. 23:59
- TA sessions 29.9 14-16, 30.9 12-14, 1.10 10-12
- Optional: Make BDA3 exercises 3.2, 3.3, 3.9 (model solutions available for 3.1-3.3, 3.5, 3.9, 3.10)
- Start reading Chapter 10, see instructions below
4) BDA3 Ch 10, Monte Carlo
Numerical issues, Monte Carlo, how many simulation draws are needed, how many digits to report, direct simulation, curse of dimensionality, rejection sampling, and importance sampling. BDA3 Ch 10.
- Read BDA3 Chapter 10
- Watch Lecture 4.1 on numerical issues, Monte Carlo, how many simulation draws are needed, how many digits to report, and Lecture 4.2 on direct simulation, curse of dimensionality, rejection sampling, and importance sampling. BDA3 Ch 10.
- Read the additional comments for Chapter 10
- Q&A Monday 4.10. 14:15-16
- Check R demos or Python demos for Chapter 10
- Make and submit Assignment 4. Deadline Sunday 10.10. 23:59
- TA sessions 6.10 14-16, 7.10 12-14, 8.10 10-12
- Optional: Make BDA3 exercises 10.1, 10.2 (model solution available for 10.4)
- Start reading Chapter 11, see instructions below
5) BDA3 Ch 11, Markov chain Monte Carlo
Markov chain Monte Carlo, Gibbs sampling, Metropolis algorithm, warm-up, convergence diagnostics, R-hat, and effective sample size. BDA3 Ch 11.
6) BDA3 Ch 12 + Stan, HMC, PPL, Stan
HMC, NUTS, dynamic HMC and HMC specific convergence diagnostics, probabilistic programming and Stan. BDA3 Ch 12 + extra material
7) BDA3 Ch 5, hierarchical models
Hierarchical models and exchangeability. BDA3 Ch 5.
9) BDA3 Ch 7, extra material, model comparison and selection
PSIS-LOO, K-fold-CV, model comparison and selection. Extra lecture on variable selection with projection predictive variable selection.
10) BDA3 Ch 9, decision analysis
Decision analysis. BDA3 Ch 9.
- Read Chapter 9
- Watch Lecture 10.1 on decision analysis. BDA3 Ch 9.
- Project presentation info will be updated soon.
- Q&A Monday 22.11. 14:15-16
- Make and submit Assignment 9. Deadline Sunday 28.11. 23:59
- TA sessions 24.11 14-16, 25.11 12-14, 26.11 10-12
- Start reading Chapter 4, see instructions below.
13) Project evaluation
- Project report deadline 6.12. 23:59 (submit to peergrade).
- Review project reports done by your peers before 9.12. 23:59, and reflect on your feedback
- Project presentations 13-17.12. (evaluation week)
R and Python
We strongly recommend using R in the course as there are more packages for Stan and statistical analysis in R. If you are already fluent in Python, but not in R, then using Python may be easier, but it can still be more useful to learn also R. Unless you are already experienced and have figured out your preferred way to work with R, we recommend
See FAQ for frequently asked questions about R problems in this course. The demo codes provide useful starting points for all the assignments.
- For learning R programming basics
- For learning basic and advanced plotting using R
Finnish terms
Sanasta “bayesilainen” esiintyy Suomessa muutamaa erilaista kirjoitustapaa. Muoto “bayesilainen” on muodostettu yleisen vieraskielisten nimien taivutussääntöjen mukaan: “Jos nimi on kirjoitettuna takavokaalinen mutta äännettynä etuvokaalinen, kirjoitetaan päätteseen tavallisesti takavokaali etuvokaalin sijasta, esim. Birminghamissa, Thamesilla.” Terho Itkonen, Kieliopas, 6. painos, Kirjayhtymä, 1997.