Aalto 2023 course can be taken online except for the
final project presentation. The lectures will be given on campus, but
recorded and the recording will be made available online after the
lecture. 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, and you can come to ask questions
on campus, but you can also ask in Zulip during the same times. 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. The project brings together the overall Bayesian
workflow aspects.
If you find BDA3 too difficult to start with, I recommend
Communication channels
- MyCourses
is used for some intial announcements, linking to Zulip and Peergrade,
and some questionnaires.
- The primary communication channel is the Zulip course chat (link in
MyCourses, login with Aalto account)
- 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. You can adjust
the notifications in the settings.
- 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 lecture time on campus includes times for questions and
answers
- 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.
Assessment
Assignments (60%) and a project work with presentation (40%). Minimum of
50% of points must be obtained from both the assignments and project
work. You can get bonus points from
chat activity (e.g. helping other students and reporting typos in the
material) and answering time usage questionnaries.
Schedule 2023
The course consists of 12 lectures, 9 assignments, a project work,
and a project presentation in periods I and II. It’s good start reading
the material for the next lecture and assignment while making the
assignment related to the previous lecture. There are 9 assignments and
a project work with presentation, and thus the assignments are not in
one-to-one correspondence with the lectures. The schedule below lists
the lectures 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. When you are working on assignment
related to previous lecture, it is good to start reading the book
chapters relaed to the next lecture and assignment.
1. Introduction |
BDA3 Chapter 1 |
2023
Lecture 1.1 Introduction, 2023
Lecture 1.2 Course practicalities, Slides 1.1, Slides 1.2 |
Assignment 1 |
4.9. |
10.9. |
2. Basics of Bayesian inference |
BDA3 Chapter 1,
BDA3 Chapter 2 |
2023
Lecture 2.1, 2023
Lecture 2.2, Slides
2 |
Assignment 2 |
11.9. |
17.9. |
3. Multidimensional posterior |
BDA3 Chapter 3 |
2023
Lecture 3.1, 2023
Lecture 3.2 Slides 3 |
Assignment 3 |
18.9. |
24.9. |
4. Monte Carlo |
BDA3 Chapter 10 |
2023
Lecture 4.1, 2023
Lecture 4.2, Slides
4 |
Assignment 4 |
25.9. |
1.10. |
5. Markov chain Monte Carlo |
BDA3 Chapter 11 |
2023
Lecture 5.1, 2023
Lecture 5.2, Slides
5 |
Assignment 5 |
2.10. |
8.10. |
6. Stan, HMC, PPL |
BDA3 Chapter 12 + extra material on Stan |
2023
Lecture 6.1, 2023
Lecture 6.2, Slides
6 |
Assignment 6 |
9.10. |
22.10. |
7. Hierarchical models and exchangeability |
BDA3 Chapter 5 |
2023
Lecture 7.1, 2023
Lecture 7.2, 2022
Project info, Slides
7 |
Assignment 7 |
23.10. |
5.11. |
8. Model checking & cross-validation |
BDA3 Chapter 6, BDA3 Chapter 7, Visualization in Bayesian
workflow, Practical
Bayesian cross-validation |
2023
Lecture 8.1, 2023
Lecture 8.2, Slides
8a,Slides 8b |
Start project work |
30.10. |
N/A |
9. Model comparison, selection, and hypothesis testing |
BDA3 Chapter 7 (not 7.2
and 7.3), Practical
Bayesian cross-validation |
2023
Lecture 9.1, 2023
Lecture 9.2, Slides
9 |
Assignment 8 |
6.11. |
12.11. |
10. Decision analysis |
BDA3 Chapter 9 |
2023
Lecture 10.1, 2023
Lecture 10.2, Slides
10a, Slides 10b |
Assignment 9 |
13.11. |
19.11. |
11. Variable selectio with projpred, project presentation
example |
BDA3 Chapter 4 |
2023
Lecture 11.1, 2023
Lecture 11.2, 2023
Lecture 11.3, Slides
11a, Slides
Project Presentation, Slides 11
extra |
Project work |
20.11. |
N/A |
12. TBA |
|
Optional:
|
Project work |
27.11. |
N/A |
13. Project evaluation |
|
|
|
Project presentations: 11.-15.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.
- Introduction/practicalities lecture Monday 4.9.
14:15-16, hall C, Otakaari 1**
- Read BDA3 Chapter 1
- There are no R/Python demos for Chapter 1
- Make and submit Assignment
1. Deadline Sunday 10.9. 23:59
- We highly recommend 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 6.9. 14-16, 7.9. 12-14, 8.9. 10-12
- 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
- Lecture Monday 11.9. 14:15-16, hall T1, CS building
- Slides 2
- Videos: 2023
Lecture 2.1, 2023
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.
- Read the additional comments for
Chapter 2
- Check R demos or Python demos for Chapter 2
- Make and submit Assignment
2. Deadline Sunday 17.9. 23:59
- Review Assignment 1 done by your peers before 23:59 13.9.
- Reflect on your feedback
- TA sessions 13.9. 12-14,
14.9. 12-14, 15.9. 12-14.
- 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
- Lecture Monday 18.9.. 14:15-16, hall T1, CS
building
- Slides 3
- Videos: 2023
Lecture 3.1 2023
Lecture 3.2 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
- Check R demos or Python demos for Chapter 3
- Make and submit Assignment
3. Deadline Sunday 24.9. 23:59
- Review Assignment 2 done by your peers before 23:59 20.9., and
reflect on your feedback.
- TA sessions 20.9. 12-14,
21.9. 12-14, 22.9. 12-14.
- 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
- Lecture Monday 25.9. 14:15-16, hall T1, CS building
- Slides 4
- Videos: 2023
Lecture 4.1 on numerical issues, Monte Carlo, how many simulation
draws are needed, how many digits to report, and 2023
Lecture 4.2 on direct simulation, curse of dimensionality, rejection
sampling, and importance sampling. BDA3 Ch 10.
- Read the additional comments for
Chapter 10
- Check R demos or Python demos for Chapter 10
- Make and submit Assignment
4. Deadline Sunday 1.10. 23:59
- Review Assignment 3 done by your peers before 23:59 27.9., and
reflect on your feedback
- TA sessions 27.9. 12-14,
28.9. 12-14, 29.9. 12-14.
- 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
- Read BDA3 Chapter 12
- Lecture Monday 9.10. 14:15-16, hall T1, CS building
- Read the additional comments for
Chapter 12
- Read Stan
introduction article
- Check R demos for RStan or Python demos for PyStan
- Additional material for Stan:
- Make and submit Assignment
6. DeadlineSunday 22.10. 23:59 (two weeks for this
assignment)
- Review Assignment 5 done by your peers before 23:59 11.10., and
reflect on your feedback
- TA sessions 11.10. 14-16,
12.10. 12-14, 13.10. 10-12.
- Start reading Chapter 5 + Stan material, see instructions below
- No Lecture on evaluation week.
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 + BDA3 Ch 4 Laplace approximation
and asymptotics
Decision analysis. BDA3 Ch 9. + Laplace approximation and
asymptotics. BDA Ch 4.
- Read Chapter 9 and 4
- Lecture Monday 13.11. 14:15-16, hall T2, CS
building
- Make and submit Assignment
9. Sunday 19.11. 23:59
- Review Assignment 8 done by your peers before 23:59 N/A, and reflect
on your feedback
- TA sessions 15.11. 14-16,
16.11. 12-14, 17.11. 10-12.
- Start reading Chapter 4, see instructions below.
12) TBA
- Lecture Monday 27.11. 14:15-16, hall T2, CS
building
- TBA
- Work on project. TAs help with projects. Project deadline
3.12. 23:59
- TA sessions 29.11. 14-16,
30.11. 12-14, 1.12. 10-12.
13) Project evaluation
- Project report deadline 3.12. 23:59 (submit to peergrade).
- Review project reports done by your peers before 7.12. 23:59, and
reflect on your feedback.
- Project presentations 11.-15.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
English-Finnish-English statistics dictionary
Excellent online English-Finnish-English statistics dictionary:
Shorter English-Finnish dictionary for the terms specific for this
course
Sanasta “bayesilainen” esiintyy Suomessa muutamaa erilaista
kirjoitustapaa. Olen käyttänyt muotoa “bayesilainen”, joka 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.
Suomen tilastoseura sen sijaan suosittaa muotoa “bayseiläinen”.
Heidän perustelunsa löytyy Tilastotieteen sanastosta (ks. linkki yllä).
Tilastotieteen sanaston verkkoversiossa on hakutoiminto, ja PDF-versio
sisältää käännösten perusteluita sekä hieman tilastotieteen varhaista
historiaa Suomessa.