Computational Statistics
This is main resources site for the Computational Statistics course. This is where all the material, including slides, assignments, and data, are collected.
Schedule
Note on the exercises:
Each Thursday, our exercise session will center around a key topic. Together, we’ll work through selected exercises on this topic. The remaining exercises are for you to solve independently at your own pace.
Week 1
Lecture 1: Introduction
- Slides: Introduction and Functions in R (source)
- Reading: Chapter 6 (AdvR)
- Exercises: A1-A7 (CSWR, Appendix A)
- Data:
infrared.txt
- Data:
Exercise Session 1
- Main topic: Setting up a proper development environment for R/Rcpp
- In class walkthrough: A1-A7 (CSwR, Appendix A)
- Solutions: Exercise 1 Solutions
Lecture 2: OOP and Density Estimation
- Slides: OOP and Density Estimation (source)
- Reading:
- Chapter 13 (AdvR)
- Sections 2-2.4 (CSwR)
- Exercises:
Week 2
Lecture 3: Measuring and Improving Performance
- Slides: Measuring and Improving Performance (source)
- Reading: Chapter 23 and Chapter 24 (Advanced R)
- Exercises: 1-3 (Section 24.4.3, AdvR)
Exercise Session 2
- Main topic: Using AI properly, memory usage and benchmarking, dependency injection, reverse engineering
- In class walkthrough: Exercises 2.1-2.6 (CSwR, Chapter 2) + 24.4.3.2 + 24.4.3.3 (AdvR)
- Solutions: Exercise 2 Solutions
- Mini-slides: Tips for using AI
Lecture 4: Parallelization and Scatterplot Smoothing
- Slides: Parallelization and Scatterplot Smoothing (source)
- Reading:
- Exercises: 3.4 (Chapter 3, CSWR)
Week 3
Lecture 5: Random Number Generation and Rejection Sampling
- Slides: Random Number Generation and Rejection Sampling (source)
- Reading:
- Exercises:
Exercise Session 3
- Main topic: Premature optimization
- In class walkthrough: Exercises 3.4 (Chapter 3, CSWR) + 5.1-5.2 (Chapter 5, CSWR)
- Solutions: Exercise 3 Solutions
Lecture 6: Monte Carlo Methods and Importance Sampling
- Slides: Monte Carlo Methods and Importance Sampling (source)
- Reading: Chapter 7 (CSwR)
Presentations of Assignment 1
- Instructions: Assignment 1
Week 4
Lecture 7: Optimization
- Slides: Optimization (source)
- Reading:
Exercise Session 4
- Main topic: Currying and decorators
- In class walkthrough: Exercises 25.2.6.1, 25.2.6.2, 25.4.5.1, 25.4.5.2(AdvR) + Bonus Example
- Solutions: Exercise 4 Solutions
Presentations of Assignment 2
- Instructions: Assignment 2
Week 5
Lecture 8: Testing and Debugging
This lecture will be mostly a hands-on session. Please bring your laptop. We will work on debugging a piece of code together. You can find the code here: debugging.R.
- Slides: Testing and Debugging (source)
- Reading: Chapter 22 (AdvR)
Exercise Session 5
- Main topic: None - work on your assignments with TA assistance
Lecture 9: Likelihood Optimization and the EM Algorithm
- Slides: Likelihood Optimization and the EM Algorithm (source)
- Reading: Chapter 10 (CSwR)
Week 6
Lecture 10: More on the EM Algorithm
- Slides: The EM Algorithm (source)
Exercise Session 6
- Main topic: None - work on your assignments with TA assistance
Lecture 11: Stochastic Gradient Descent
- Slides: Stochastic Gradient Descent (source)
- Reading: Sections 11-11.1 (CSwR)
Presentations of Assignment 3
- Instructions: Assignment 3
Autumn Holiday Week
Enjoy your break!
Week 7
Lecture 12: Rcpp
Prior to this lecture, you should have Rcpp installed. You can follow the instructions in Rcpp for Everyone to get started.
- Slides: Rcpp (source)
- Reading: Chapter 25 (AdvR)
- Exercises:
- 1 and 2 from 25.2.6 (AdvR)
- 1 and 2 from 25.4.5 (AdvR)
- If you have time over, try the exercises in 25.5.7 (AdvR) too
Exercise Session 7
- Main topic: Branch prediction
- In class walkthrough: TA will go through the topic with a live coding example.
- Solutions: Exercise 7
Lecture 13: Variations on Stochastic Gradient Descent
- Slides: Variations on Stochastic Gradient Descent (source)
- Reading: Sections 11.2-11.3 (CSwR)
Presentations of Assignment 4
- Instructions: Assignment 4
Week 8
Lecture 14: R Packages and Wrap-Up
This lecture will mostly be a hands-on session. Please bring your laptop. We will work on creating an R package together. Please install the devtools package prior to the lecture.
- Slides: R Packages and Wrap-Up (source)
Week 9
Examinations
See the schedule on Absalon.