-
Notifications
You must be signed in to change notification settings - Fork 556
/
assignments_gsu.Rmd
244 lines (184 loc) · 30.2 KB
/
assignments_gsu.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
---
title: "Bayesian Data Analysis course - Assignments (GSU)"
date: "Page updated: `r format.Date(file.mtime('assignments_gsu.Rmd'),'%Y-%m-%d')`"
---
Bayesian Data Analysis Global South (GSU) 2023
You are free to use these assignments in self study and other courses
(CC-BY-NC 4.0), but please do not publish complete answers online.
If you are a student on this course, you are allowed to discuss assignments with your friends, but it is not allowed to copy solutions directly from other students, from the internet, or from large language models. You can copy, e.g., plotting code from the course demos, but really try to solve the actual assignment problems with your own code and explanations. Do not share your answers publicly.
## Schedule
| | Block | Readings | Lectures | Assignment | | Assignment due date |
|---|:-----------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|----------------------------------|---------------------|
| | 1. Introduction | [BDA3 Chapter 1](chapter_notes/BDA_notes_ch1.pdf) | [Computational probabilistic modeling](https://www.youtube.com/watch?v=ukE5aqdoLZI), <br> [Introduction to uncertainty and modelling](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=a441a604-ba91-4f51-b88c-af0700b9f2b1), <br> [Introduction to the course contents](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=13fc7889-cfd1-4d99-996c-a9f400f6e5a2) | [Assignment 1 and Rubric questions](assignments/assignment1.html) | | 26 February |
| | 2. Basics of Bayesian inference | [BDA3 Chapter 1](chapter_notes/BDA_notes_ch1.pdf), <br> [BDA3 Chapter 2](chapter_notes/BDA_notes_ch2.pdf) | [Lecture 2.1](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=66aa86ca-9346-4f7f-af76-af0e00b9cb83), <br> [Lecture 2.2](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=0b59d2d7-8e48-406c-a51e-af0e00ca3035), <br> Optional: <br> [Extra explanations 2](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=158d119d-8673-4120-8669-ac3900c13304), <br> [Summary 2.1](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=7a297f7d-bb7b-4dd0-9913-a9f500ec822d), <br> [Summary 2.2](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=75b9f18f-e379-4557-a5fa-a9f500f11b40) | [Assignment 2 and Rubric questions](assignments/assignment2.html) | | 6 March |
| | 3. Multidimensional posterior | [BDA3 Chapter 3](chapter_notes/BDA_notes_ch3.pdf) | [Lecture 3](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=ca0ea8b9-31f0-406d-9d2f-af1600f9826d) | [Assignment 3 and Rubric questions](assignments/assignment3.html) | | 13 March |
| | 4. Monte Carlo | [BDA3 Chapter 10](chapter_notes/BDA_notes_ch10.pdf) | [Lecture 4.1](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=ab7b792b-50ef-42f4-90f5-af1c00b98b48), <br> [Lecture 4.2](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=fe23cc92-4d90-4f68-9148-af1c00e29790) | [Assignment 4 and Rubric questions](assignments/assignment4.html) | | 20 March |
| | 5. Markov chain Monte Carlo | [BDA3 Chapter 11](chapter_notes/BDA_notes_ch11.pdf) | [Lecture 5.1](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=96b8a8a9-60b6-4a7b-bca9-af2300b98547), <br> [Lecture 5.2](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=fdd0c498-4e4a-4586-8ba9-af2300ca712d) | [Assignment 5 and Rubric questions](assignments/assignment5.html) | | 27 March |
| | 6. Stan, HMC, PPL | [BDA3 Chapter 12](chapter_notes/BDA_notes_ch12.pdf) + [extra material on Stan](index.html#stan) | [Lecture 6.1](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=4cc8f763-ca6a-4f2f-b19c-af2a00ba8eb4), <br>[Lecture 6.2](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=f4eb4269-bb83-49aa-9243-af2a00ccb873) | [Assignment 6 and Rubric questions](assignments/assignment6.html) | | 3 April |
| | 7. Hierarchical models and exchangeability | [BDA3 Chapter 5](chapter_notes/BDA_notes_ch5.pdf) | [Lecture 7.1](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=6cf678f1-395d-4c91-87c7-af3800da0ff4), <br> [Lecture 7.2](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=2320d64f-1e40-45b0-9b17-af3800c9f435) | [Assignment 7 and Rubric questions](assignments/assignment7.html) | | 17 April |
| | 8. Model checking & cross-validation | [BDA3 Chapter 6](chapter_notes/BDA_notes_ch6.pdf), [BDA3 Chapter 7](chapter_notes/BDA_notes_ch7.pdf), [Visualization in Bayesian workflow](https://doi.org/10.1111/rssa.12378), [Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC](https://arxiv.org/abs/1507.04544) | [Lecture 8.1](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=2c578385-aedc-4657-bc10-af3f00ca3485), <br> [Lecture 8.2](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=f99824f2-2028-43d3-b6c5-af3f00dcafdb) | Start project work | | |
| | 9. Model comparison and selection | [BDA3 Chapter 7 (not 7.2 and 7.3)](chapter_notes/BDA_notes_ch7.pdf), <br> [Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC](https://arxiv.org/abs/1507.04544) | [Lecture 9.1](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=a67324b3-dd4d-48f0-8873-af4600cb8fd0), <br> Optional: <br> [Lecture 9.2](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=0649acb6-d782-4667-86db-af4600da8d2f), <br> [Lecture 9.3](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=4b6eeb48-ae64-4860-a8c3-ab0200e40ad8) | [Assignment 8 and Rubric questions](assignments/assignment8.html) | | 1 May |
| | 10. Decision analysis | [BDA3 Chapter 9](chapter_notes/BDA_notes_ch9.pdf) | [Lecture 10.1](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=a22aab9c-953c-4ea8-b6ec-af4d00c9fe58) | [Assignment 9 and Rubric questions](assignments/assignment9.html) | | 8 May |
| | 11. Normal approximation, frequency properties | [BDA3 Chapter 4](chapter_notes/BDA_notes_ch4.pdf) | [Lecture 11.1](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=8cde4d40-1b77-4110-af98-af5400ca38b5), <br> [Lecture 11.2](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=d83f6553-1516-475f-8898-af5400dd7b50) | | | |
| | 12. Extended topics | Optional: BDA3 Chapter 8, <br> BDA3 Chapter 14-18, <br> BDA3 Chapter 21 | Optional: <br> [Lecture 12.1](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=66f5a95d-3288-4338-8b35-af5b00ca9ffc), <br> [Lecture 12.2](https://aalto.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=aa2d2d7e-a762-40e7-9d41-af5b00dd0db9) | Project work | | 15 May |
| | 13. Project feedback | | | Project feedback | | 22 May |
## Weekly assignments
There are 9 weekly assignments. Assignments are linked from [the schedule](gsu2023.html#Schedule_2023) and can also be found from [git repo assignments
folder](https://github.com/avehtari/BDA_course_Aalto/tree/master/assignments). The deadline days for the assignments are given
in [the course schedule](gsu2023.html#Schedule_2023).
- There are chat channels **#assignment1** etc. you can ask questions about the assignments. Other students and TAs can answer these. There is no guaranteed response time. These channels are best for questions that are likely to have relatively simple answer.
- This course instance is volunteer based, but we try to organize some [TA sessions](#TA_sessions) for getting extra help. These sessions are useful if you think you need help that requires a bit more discussion. The questions are answered during the TA session time (if there are too many questions, they may be answered in the chat or next TA session).
- You can use [R markdown template](https://github.com/avehtari/BDA_course_Aalto/tree/master/templates/) for the report. You can also use any other software, but please follow the outline and ideas in the template [also available as PDF](https://github.com/avehtari/BDA_course_Aalto/tree/master/templates/)
- Students return their answers to
[peergrade](https://www.peergrade.io) by the end of Sunday (hand-in
period). The deadlines are on Sundays 23:59 (UTC+3). We can't accept late submissions due to the peergrading process.
- After this, each student reviews 3 random other students'
answers and provides feedback via online rubric form in peergrade during Monday (actually the feedback opens on Saturday, but I recommend to take weekends off) to
Wednesday 23:59 (peer grading period). By reviewing other report you will see the correct answers in the rubrics, see others answers, and learn more actively by providing feedback for others.
- If you happen to get empty or almost empty report to review, check first if it is better when opened in external pdf reader. If the report is still empty or almost empty, mark the submission as problematic and you will get another report to review.
- After peergrading, each student reflects on the feedback (reactions, e.g. not helpful/helpful).
- If a student receives inappropriate feedback/grading or reaction, they may "flag" it
for TAs to check from Wednesday to Sunday (flagging period). In this course instance there is no formal certificate for passing the course, so there is no need to flag lightly, but you can use flagging to report clear misbehavior and we can remove misbehaving students from the system.
- Peergrade alerts: If you are worried that you forget the deadlines, you can set peergrade 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.
Report all results in a single, **anonymous** *.pdf -file and submit it in
[peergrade](https://www.peergrade.io). Submitting empty or almost
empty pdf files is not allowed. Include also any source code to the report
(either in appendix or embedded in the answer). By anonymity it is meant
that the report should not contain your name or email. In
addition to the correctness of the answers, the overall quality and
clearness of the report is also evaluated.
The assignments are mostly solved using computer (R or Python). Related
demos for each assignment are available in the course web pages (links
in Materials section).
Overall recommendation for many students is to include more text
explanations as writing that text is active way of learning, and also
it's easier to see if you have understood the concepts correctly. If
you make minimal reports, you will also get minimal feedback and you
learn less. The main purpose of the course is to learn, and learning
is more effective if you do it in active and interactive way.
## Peergrade
Register to peergrade with your email. The class code needed for
registration will be posted to all registered students before the
course starts.
## Peergrading / feedback
Peergrading is called giving feedback in peergrade.io. The peergrading
is guided by the rubric questions which are visible in peergrade and
in the schedule. Giving feedback is good term as it is not meant to be
just grading wrong vs. correct answers. Please provide also feedback
on the presentation. Part of the course is practicing making data
analysis reports. By providing feedback on the report presentation
other students can learn what they can improve or what they already
did well. You should be able to provide constructive or positive
feedback for all non-empty reports, even if there is nothing to say
about the technical correctness of the answers. If you all provide
more feedback, you will all learn more about good data analysis
reports. Be kind.
## Assignment scoring
Points are given from both *submitting an assignment* and *giving
feedback*. *Submission performance* gives 75\% and *feedback performance*
25\% of the total score. Only those students who returned a given
assignment are allowed to give feedback to the answers submitted by others.
### Submission score
After peer grading is over for an assignment, each submission receives a
*submission score*. This score is between 0\% and 100\% depending on how
well the peers evaluated the submission. This is mostly about the
technical correctness and small part about the presentation.
The numerical score for each criteria is normalised to be between 0\%
and 100\%, where 0\% is given to the worst, and 100\% to the best
possible answer. As an example, in a Scale-question with 5
levels, the different answers will count 0\%, 25\%, 50\%, 75\%, 100\%.
The total submission score is calculated for a submission by averaging
the scores from each of the peers. The score from an individual peer
evaluating a submission is obtained by averaging over the criteria in
the feedback rubric.
Within each assignment, there are two sections *Basic requirements* and
*Overall quality of the report*. These segments are weighted so that
they each provide 7.5\% of that assignment's total score. The remaining
85\% is distributed evenly to the rest of the sections. Within each
section, the points are distributed evenly among each question.
If a student has flagged some of their received evaluations and a TA has
accepted the flag and overruled the original evaluation, then TA's new
evaluation is used for computing the score instead. If a teacher
overrules a specific evaluation by one student, that answer is taken to be
the correct one for that part of that submission. This means that
the evaluations by other students on that part are disregarded in the final
score of the submission.
There are 9 assignment rounds in total. Each round has different
weighting when computing the total score. The assignment instructions
list max points for each assignment as 3, 3, 9, 6, 6, 6, 6, 6,
3. These translate (approximately) to weights 6%, 6%, 19%, 12%, 12%,
12%, 12%, 12%, 6%.
### Feedback score
The *feedback score* depends on the reactions, such that a student's
feedback score on an assignment is an average of the reactions
received. If no reactions have been given to the student's reviews, no
feedback score is computed and it will simply show as "-".
When you provide feedback, you can provide constructive and positive
feedback n how to improve presentation or tell what is already very
good. By providing that kind of feedback you are more likely to
receive higher feedback score.
The following are reasons to react positively to feedback:
- Reviewer giving you tips on how to improve the presentation of the report or specific answer.
- Reviewer making the effort of finding and pointing out where your bug originates from.
Be kind when reacting to to the feedback. If you didn't like the
feedback, think first a moment, and then re-consider whether it was
just the wording that got you angry and maybe there is something
useful in the feedback.
Note that the baseline feedback reaction is "Somewhat useful. Could be
more elaborate." which corresponds to 0.5 points or as Peergrade shows
it to 50%. It might make you feel better if you consider that the
middle option is 100%, as then you have already provided useful
feedback which is the goal, and then the higher categories "Very
useful" and "Extremely useful" would be 150% and 200% and you can
consider receiving bonus points.
## Be polite
Remember to be polite when peergrading, giving feedback, and reacting to
feedback. Do not spend a lot of time fighting over the grading of one question
from one student. If you don't agree you can submit a flag or in extreme case
contact the TAs. Also, keep in mind that in most of the cases, which
we've seen, the students have been fighting for points which have less
than a 1/1000 effect on the final score. Long fight over that is not
worth the time and energy. If you get feedback which makes you angry, breath and wait a
moment before unleashing your anger back. We ask you to honor the
system and be polite to your peers.
## TA sessions
You can get help for the assignments by asking in the course chat from other
students or in TA sessions by asking TAs.
- There are chat channels **#assignment1** etc. you can ask questions about the assignments. Other students and TAs can answer these. There is no guaranteed response time. These channels are best for questions that are likely to have relatively simple answer and thus are likely to be answered before the next TA session.
- There are [TA sessions](#TA_sessions) for getting one-on-one help. These sessions are not obligatory. These sessions are useful if you think you need help that requires a bit more discussion. The questions are answered duirng the TA session time (if there are two many questions, they may be answered in the chat or next TA session).
As this course instance is based on volunteer TAs we can't guarantee
how many TA session we have each week. TA sessions will be announced
during the course.
During the TA session you can get help in the following forms:
- Written communication on *the course chat*: you will chat with a TA using the “direct messages” feature on *the course chat*. You can also, for example, share code snippets and equations through chat direct messages if it helps.
- Oral communication on Zoom: you will chat with a TA using a video conference on Zoom. You can also use, for example, screen sharing on Zoom if it helps.
We will use the channel **#queue** in the course chat to coordinate everything. We announce there when the TA session starts. Then you can write your help request there, describing in sufficient detail exactly what is the problem with which you would need help (see below).
Once a TA is free and your question is the first request in the queue, a TA will mark it with a check mark reaction. Then the TA will contact you and help with your problem. Finally, once the problem is solved, the TA who helped you will delete your request from the queue.
### Getting help via the course chat
- Go to the chat channel #queue.
- Write a help request (see below), starting with the keyword “Chat”.
- A TA will send you a direct message on Chat.
- You will discuss through direct messages until your problem is solved, and then the TA will close the discussion and delete your help request.
Please do not send direct messages to TAs without going through the above protocol. If you have follow-up questions later, please put a new request to the queue.
### Getting help via Zoom
- Open Zoom, and make sure your video and audio are configured correctly. Create a new Zoom conference call, and copy the meeting URL.
- Go to the Chat channel #queue.
- Write a help request (see below), starting with the keyword “Zoom”, and end it with the Zoom meeting URL.
- A TA will click on the meeting URL to join the Zoom conference that you created.
- You will get help until your problem is solved, and then the TA will close the call and delete your help request.
### What to write in the help request?
Your help request should contain a concise summary of exactly what kind of help you would need. Ideally, after reading the help request, a TA should be able to already have an answer for you.
Try to describe what is the problem, what you have tried, what you already know, and exactly what is the relevant part of the code. Please highlight the important parts. Here are some fictional examples of good help requests:
---
**Chat**: I am not able to get the correct solution to assignment 2 part c) by using the test data. According to the assignment pdf, the correct solution is 0.4511238, but I am getting the answer 0.3771946. The code for my function is:
`EXAMPLE CODE 1`
I thought that I have an error in ..., so I tried changing ... to ..., but then I got a different wrong answer, 0.4285443. I think the error may be on line 3 in the code, but I do not know how to fix that.
---
**Zoom**: I am trying to install the R package ... on my personal laptop and I am getting the following error:
`EXAMPLE ERROR`
My operating system is ..., I have version ... of R installed and I am using RStudio. I tried googling the error but was not able to solve the issue. Zoom meeting link: https://aalto.zoom.us/j/XXX
---
### Acknowledgements {.toc-ignore}
TA session instructions above have been copied from [Programming
Parallel Computers by Jukka Suomela](http://ppc.cs.aalto.fi/2020/lab/)
with CC-BY-4.0 license.