forked from avehtari/BDA_course_Aalto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathassignments_gsu.html
549 lines (459 loc) · 24.7 KB
/
assignments_gsu.html
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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<title>Bayesian Data Analysis course - Assignments (GSU)</title>
<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/readable.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
<script src="site_libs/navigation-1.1/tabsets.js"></script>
<link href="site_libs/highlightjs-9.12.0/default.css" rel="stylesheet" />
<script src="site_libs/highlightjs-9.12.0/highlight.js"></script>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
</style>
<style type="text/css">code{white-space: pre;}</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
hljs.initHighlightingOnLoad();
if (document.readyState && document.readyState === "complete") {
window.setTimeout(function() { hljs.initHighlighting(); }, 0);
}
}
</script>
<style type = "text/css">
.main-container {
max-width: 940px;
margin-left: auto;
margin-right: auto;
}
img {
max-width:100%;
}
.tabbed-pane {
padding-top: 12px;
}
.html-widget {
margin-bottom: 20px;
}
button.code-folding-btn:focus {
outline: none;
}
summary {
display: list-item;
}
details > summary > p:only-child {
display: inline;
}
pre code {
padding: 0;
}
</style>
<style type="text/css">
.dropdown-submenu {
position: relative;
}
.dropdown-submenu>.dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
border-radius: 0 6px 6px 6px;
}
.dropdown-submenu:hover>.dropdown-menu {
display: block;
}
.dropdown-submenu>a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #cccccc;
margin-top: 5px;
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #adb5bd;
}
.dropdown-submenu.pull-left {
float: none;
}
.dropdown-submenu.pull-left>.dropdown-menu {
left: -100%;
margin-left: 10px;
border-radius: 6px 0 6px 6px;
}
</style>
<script type="text/javascript">
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
href = window.location.pathname
href = href.substr(href.lastIndexOf('/') + 1)
if (href === "")
href = "index.html";
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.tab('show');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
// Navbar adjustments
var navHeight = $(".navbar").first().height() + 15;
var style = document.createElement('style');
var pt = "padding-top: " + navHeight + "px; ";
var mt = "margin-top: -" + navHeight + "px; ";
var css = "";
// offset scroll position for anchor links (for fixed navbar)
for (var i = 1; i <= 6; i++) {
css += ".section h" + i + "{ " + pt + mt + "}\n";
}
style.innerHTML = "body {" + pt + "padding-bottom: 40px; }\n" + css;
document.head.appendChild(style);
});
</script>
<!-- tabsets -->
<style type="text/css">
.tabset-dropdown > .nav-tabs {
display: inline-table;
max-height: 500px;
min-height: 44px;
overflow-y: auto;
border: 1px solid #ddd;
border-radius: 4px;
}
.tabset-dropdown > .nav-tabs > li.active:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
content: "";
border: none;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}
.tabset-dropdown > .nav-tabs > li.active {
display: block;
}
.tabset-dropdown > .nav-tabs > li > a,
.tabset-dropdown > .nav-tabs > li > a:focus,
.tabset-dropdown > .nav-tabs > li > a:hover {
border: none;
display: inline-block;
border-radius: 4px;
background-color: transparent;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
display: block;
float: none;
}
.tabset-dropdown > .nav-tabs > li {
display: none;
}
</style>
<!-- code folding -->
<style type="text/css">
#TOC {
margin: 25px 0px 20px 0px;
}
@media (max-width: 768px) {
#TOC {
position: relative;
width: 100%;
}
}
@media print {
.toc-content {
/* see https://github.com/w3c/csswg-drafts/issues/4434 */
float: right;
}
}
.toc-content {
padding-left: 30px;
padding-right: 40px;
}
div.main-container {
max-width: 1200px;
}
div.tocify {
width: 20%;
max-width: 260px;
max-height: 85%;
}
@media (min-width: 768px) and (max-width: 991px) {
div.tocify {
width: 25%;
}
}
@media (max-width: 767px) {
div.tocify {
width: 100%;
max-width: none;
}
}
.tocify ul, .tocify li {
line-height: 20px;
}
.tocify-subheader .tocify-item {
font-size: 0.90em;
}
.tocify .list-group-item {
border-radius: 0px;
}
</style>
</head>
<body>
<div class="container-fluid main-container">
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
</div>
<div class="toc-content col-xs-12 col-sm-8 col-md-9">
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-bs-toggle="collapse" data-target="#navbar" data-bs-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">Bayesian Data Analysis course</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html">Material</a>
</li>
<li>
<a href="Aalto2022.html">Aalto 2022</a>
</li>
<li>
<a href="assignments.html">Assignments</a>
</li>
<li>
<a href="project.html">Project</a>
</li>
<li>
<a href="demos.html">Demos</a>
</li>
<li>
<a href="FAQ.html">FAQ</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
<div id="header">
<h1 class="title toc-ignore">Bayesian Data Analysis course - Assignments (GSU)</h1>
<h4 class="date">Page updated: 2022-08-03</h4>
</div>
<p>Bayesian Data Analysis Global South (GSU) 2022</p>
<p>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.</p>
<p>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 or from internet. 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.</p>
<div id="weekly-assignments" class="section level2">
<h2>Weekly assignments</h2>
<p>There are 9 weekly assignments. Assignments are linked from <a href="gsu2022.html#Schedule_2022">the schedule</a> and can also be found from <a href="https://github.com/avehtari/BDA_course_Aalto/tree/master/assignments">git repo assignments folder</a>. The deadline days for the assignments are given in <a href="gsu2022.html#Schedule_2022">the course schedule</a>.</p>
<ul>
<li>There are chat channels <strong>#assignment1</strong> 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.</li>
<li>This course instance is volunteer based, but we try to organize some <a href="#TA_sessions">TA sessions</a> 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).</li>
<li>You can use <a href="https://github.com/avehtari/BDA_course_Aalto/tree/master/templates/">R markdown template</a> for the report. You can also use any other software, but please follow the outline and ideas in the template <a href="https://github.com/avehtari/BDA_course_Aalto/tree/master/templates/">also available as PDF</a></li>
<li>Students return their answers to <a href="https://www.peergrade.io">peergrade</a> 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.</li>
<li>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.</li>
<li>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.</li>
<li>After peergrading, each student reflects on the feedback (reactions, e.g. not helpful/helpful).</li>
<li>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.</li>
<li>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.</li>
</ul>
<p>Report all results in a single, <strong>anonymous</strong> *.pdf -file and submit it in <a href="https://www.peergrade.io">peergrade</a>. 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.</p>
<p>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).</p>
<p>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.</p>
</div>
<div id="peergrade" class="section level2">
<h2>Peergrade</h2>
<p>Register to peergrade with your email. The class code needed for registration will be posted to all registered students before the course starts.</p>
</div>
<div id="peergrading-feedback" class="section level2">
<h2>Peergrading / feedback</h2>
<p>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.</p>
</div>
<div id="assignment-scoring" class="section level2">
<h2>Assignment scoring</h2>
<p>Points are given from both <em>submitting an assignment</em> and <em>giving feedback</em>. <em>Submission performance</em> gives 70% and <em>feedback performance</em> 30% of the total score. Only those students who returned a given assignment are allowed to give feedback to the answers submitted by others.</p>
<div id="submission-score" class="section level3">
<h3>Submission score</h3>
<p>After peer grading is over for an assignment, each submission receives a <em>submission score</em>. This score is between 0% and 100% depending on how well the peers evaluated the submission. This is mostly about the technical correcteness and small part about the presentation.</p>
<p>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%.</p>
<p>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.</p>
<p>Within each assignment, there are two sections <em>Basic requirements</em> and <em>Overall quality of the report</em>. 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.</p>
<p>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.</p>
<p>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%.</p>
</div>
<div id="feedback-score" class="section level3">
<h3>Feedback score</h3>
<p>The <em>feedback score</em> 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 “-”.</p>
<p>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.</p>
<p>The following are reasons to react positively to feedback:</p>
<ul>
<li>Reviewer giving you tips on how to improve the presentation of the report or specific answer.</li>
<li>Reviewer making the effort of finding and pointing out where your bug originates from.</li>
</ul>
<p>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.</p>
<p>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.</p>
</div>
</div>
<div id="be-polite" class="section level2">
<h2>Be polite</h2>
<p>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.</p>
</div>
<div id="ta-sessions" class="section level2">
<h2>TA sessions</h2>
<p>You can get help for the assignments by asking in the course chat from other students or in TA sessions by asking TAs.</p>
<ul>
<li>There are chat channels <strong>#assignment1</strong> 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.</li>
<li>There are <a href="#TA_sessions">TA sessions</a> 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).</li>
</ul>
<p>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.</p>
<p>During the TA session you can get help in the following forms:</p>
<ul>
<li>Written communication on <em>the course chat</em>: you will chat with a TA using the “direct messages” feature on <em>the course chat</em>. You can also, for example, share code snippets and equations through chat direct messages if it helps.</li>
<li>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.</li>
</ul>
<p>We will use the channel <strong>#queue</strong> 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).</p>
<p>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.</p>
<div id="getting-help-via-the-course-chat" class="section level3">
<h3>Getting help via the course chat</h3>
<ul>
<li>Go to the chat channel #queue.</li>
<li>Write a help request (see below), starting with the keyword “Chat”.</li>
<li>A TA will send you a direct message on Chat.</li>
<li>You will discuss through direct messages until your problem is solved, and then the TA will close the discussion and delete your help request.</li>
</ul>
<p>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.</p>
</div>
<div id="getting-help-via-zoom" class="section level3">
<h3>Getting help via Zoom</h3>
<ul>
<li>Open Zoom, and make sure your video and audio are configured correctly. Create a new Zoom conference call, and copy the meeting URL.</li>
<li>Go to the Chat channel #queue.</li>
<li>Write a help request (see below), starting with the keyword “Zoom”, and end it with the Zoom meeting URL.</li>
<li>A TA will click on the meeting URL to join the Zoom conference that you created.</li>
<li>You will get help until your problem is solved, and then the TA will close the call and delete your help request.</li>
</ul>
</div>
<div id="what-to-write-in-the-help-request" class="section level3">
<h3>What to write in the help request?</h3>
<p>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.</p>
<p>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:</p>
<hr />
<p><strong>Chat</strong>: 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:</p>
<p><code>EXAMPLE CODE 1</code></p>
<p>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.</p>
<hr />
<p><strong>Zoom</strong>: I am trying to install the R package … on my personal laptop and I am getting the following error:</p>
<p><code>EXAMPLE ERROR</code></p>
<p>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: <a href="https://aalto.zoom.us/j/XXX" class="uri">https://aalto.zoom.us/j/XXX</a></p>
<hr />
</div>
<div id="acknowledgements" class="section level3 toc-ignore">
<h3>Acknowledgements</h3>
<p>TA session instructions above have been copied from <a href="http://ppc.cs.aalto.fi/2020/lab/">Programming Parallel Computers by Jukka Suomela</a> with CC-BY-4.0 license.</p>
</div>
</div>
</div>
</div>
</div>
<script>
// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
$('tr.odd').parent('tbody').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
bootstrapStylePandocTables();
});
</script>
<!-- tabsets -->
<script>
$(document).ready(function () {
window.buildTabsets("TOC");
});
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>
<!-- code folding -->
<script>
$(document).ready(function () {
// temporarily add toc-ignore selector to headers for the consistency with Pandoc
$('.unlisted.unnumbered').addClass('toc-ignore')
// move toc-ignore selectors from section div to header
$('div.section.toc-ignore')
.removeClass('toc-ignore')
.children('h1,h2,h3,h4,h5').addClass('toc-ignore');
// establish options
var options = {
selectors: "h1,h2,h3",
theme: "bootstrap3",
context: '.toc-content',
hashGenerator: function (text) {
return text.replace(/[.\\/?&!#<>]/g, '').replace(/\s/g, '_');
},
ignoreSelector: ".toc-ignore",
scrollTo: 0
};
options.showAndHide = true;
options.smoothScroll = true;
// tocify
var toc = $("#TOC").tocify(options).data("toc-tocify");
});
</script>
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
document.getElementsByTagName("head")[0].appendChild(script);
})();
</script>
</body>
</html>