About this course
Some additional details about the course
Course guide listing: includes information about requirements and assessments.
Lecturer: Joshua Loftus. Seminars are run by the class teachers and by me.
Assessment
The assessment is as described in the course guide; details of each component will be given during the term.
References
These are all available free online at the links below.
ISLR: An Introduction to Statistical Learning with Applications in R
Our main text for most of the term. Readings are given by chapter and page from the second edition.
PPA: Patterns, Predictions, and Actions
Where the idea of machine learning as a prediction competition comes from, and our reference for a few topics that computer scientists cover and statisticians’ textbooks don’t.
CausalML: Applied Causal Inference Powered by ML and AI
A reference for the causal thread of the course (weeks 3, 8 and 10); assigned as optional deeper reading, and the natural next stop after week 10.
R4DS: R for Data Science
There are many good sources about R that you can find online, but this one has the advantage of offering one coherent point of view.
Going deeper
ESL (Elements of Statistical Learning) is the more advanced version of ISLR, by some of the same authors; most of the theorems in this course are in it somewhere. CASI (Computer Age Statistical Inference) has a different emphasis and some history. IML (Interpretable Machine Learning) is our reference for partial dependence, feature importance and Shapley values; we refer to it by chapter title because its chapter numbers keep changing.
Ethical guidelines
Brief documents published by professional societies on the ethical practice of statistics or data science. They are all worth reading and comparing: Royal Statistical Society, American Statistical Association, Association for Computing Machinery.
Installing R and RStudio
First install R and then RStudio (RStudio includes Quarto, which renders the seminar notebooks). Open RStudio and run
install.packages(c("tidyverse", "gapminder", "broom", "palmerpenguins", "GGally", "modeldata",
"yardstick", "ggdag", "dagitty", "patchwork", "glmnet", "ISLR2",
"mgcv", "ggplot2movies", "randomForest", "pdp", "rpart", "partykit",
"xgboost", "kernelshap", "shapviz", "fivethirtyeight",
"AppliedPredictiveModeling"))This is every package the seminar notebooks load, for the whole term (MASS, also used, ships with R). Week 1 needs only the first three. The seminar notebooks are Quarto (.qmd) files: open them in RStudio and either press Render or run the chunks one at a time.
The course guide requires students with no experience of R to complete the Digital Skills Lab’s pre-sessional R course; if that is you and you have not done it, do it in the first week, because the seminars assume it from week 1 (writing a function and a for loop) and build on it (numerical linear algebra, recursion, several package interfaces). The Lab lists the current term’s courses and runs daily online drop-in sessions: Digital Skills Lab. The first seminar starts with a chunk that loads the packages, so you will know at once whether your installation works.
Note: on a Mac or Linux computer you may prefer to install R and RStudio with a package manager. Personally, on a Mac I use Homebrew.