Intermediate Machine Learning

Intermediate Machine Learning

S&DS 365 is a second course in machine learning at the advanced undergraduate or beginning graduate level. The course assumes familiarity with the basic ideas and techniques in machine learning, for example as covered in S&DS 265. The course treats methods together with mathematical frameworks that provide intuition and justifications for how and when the methods work. Assignments give students hands-on experience with machine learning techniques, to build the skills needed to adapt approaches to new problems. Topics include nonparametric regression and classification, kernel methods, risk bounds, nonparametric Bayesian approaches, attention and language models, generative models, sparsity and manifolds, and reinforcement learning. Programming is central to the course, and is based on the Python programming language and Jupyter notebooks.

As prerequisites, students are expected to have a background in probability and statistics, at the level of S&DS 242 (Theory of Statistics), familiarity with the core ideas from linear algebra, for example through Math 222 (Linear Algebra with Applications), and computational skills at the level of S&DS 265 (Introductory Machine Learning) or CPSC 200 (Introduction to Information Systems). Background material can be found at the Introductory Machine Learning (S&DS 265) course site.

Computing for the course uses Python in Jupyter notebooks. These can be run using Anaconda with the IML environment that includes the packages we’ll need (click here to download) ; instructions for installing this environment are available on Yale Canvas. The notebooks can also be run in Google Colab by clicking on the icon.

Readings marked are written at a more advanced and technical level, and give further detail and as a complement to what is presented in class; students are not responsible for the parts that are not discussed in lecture. Additional readings are listed as “Readings: PML” and refer to sections in the book Probabilistic Machine Learning: An Introduction, by Kevin Murphy, MIT Press, 2022 (forthcoming).

Calendar Spring 2022

Lectures: Monday/Wednesday 11:30-12:50

Week Dates Topics Demos & Tutorials Lecture Slides Readings & Notes Assignments & Exams
1 Jan 26, 28 Course overview Python elements
Pandas and regression
Lasso example
Jan 26: Course overview
Jan 28: Sparse regression
PML Section 11.4  
2 Jan 31, Feb 2 Smoothing and kernels Smoothing example
Using different kernels
Mercer kernels
Jan 31: Smoothing
Feb 2: Mercer Kernels
PML Sections 16.3, 17.1
Notes on Mercer kernels
 
3 Feb 7, 9 Density estimation and risk bounds Density estimation demo Feb 7, 9: Sync up Bias-variance tradeoff for density estimation Feb 9: Assn1 out
4 Feb 14, 16 Neural networks for classification TensorFlow playground
Convolution demo
Problem 4 warmup
Feb 9: Neural networks
Feb 14: Convolutional neural networks
Feb 16: CNNs continued
PML Sections 13.1, 13.2
Notes on backpropagation
Feb 16: Quiz 1
5 Feb 21, 23 Nonparametric Bayes Parametric Bayes
Gaussian processes
Dirichlet processes
Feb 21: Gaussian processes
Feb 23: Gaussian and Dirichlet processes
PML Section 17.2
Notes on Bayesian inference
Notes on nonparametric Bayes
Feb 23: Assn 1 in; Assn2 out
6 Feb 28, Mar 2 Gibbs sampling DP demo, ver. 2
Gibbs sampling
Feb 28: Dirichlet processes
Mar 2: Gibbs sampling
Notes on Gibbs sampling Mar 2: Quiz 2
7 Mar 7, 9 Variational inference Variational autoencoders Mar 7: Introduction to approximate inference
Mar 9: Variational inference and VAEs
PML Section 20.3
Notes on variational inference
Mar 9: Assn 2 in
8 Mar 14, 16 Review and midterm   Mar 14: VAEs and review
Mar 16: Midterm
Practice midterm Mar 16: Midterm exam
9 Mar 28, 30 Graphs and structure learning Graphical lasso demo
Graph neural networks
Mar 28: Sparsity and graphs
Mar 30: Discrete data and graph neural nets
Notes on graphs and structure learning
PML Section 23.4
Mar 30: Assn3 out
10 Apr 4, 6 Deep reinforcement learning Q-learning demo Apr 4: Reinforcement learning
Apr 6: Deep reinforcement learning
Sutton and Barto, Section 6.5 Apr 6: Quiz 3
11 Apr 11, 13 Policy gradient methods DQN demo
Policy gradients demo
Actor-critic demo
Apr 11: Policy gradient methods
Apr 13: Actor-critic methods
Sutton and Barto, Section 13.1-13.3, 13.5 Apr 13: Assn 3 in
Assn4 out
12 Apr 18, 20 Sequential and sequence-to-sequence models RNN demo: Fakespeare
TensorFlow: Text generation
Apr 18: HMMs and RNNs
Apr 20: RNNs, GRUs, LSTMs, and all that
PML Chapter 15 Apr 20: Quiz 4
13 Apr 25, 27 Attention and language models GPT-3 demo
Codex demo
Apr 25: Sequence-to-sequence models and attention
Apr 27: Course wrap up
PML Sections 15.4, 15.5 Apr 27: Assn 4 in
  May 7 Final exam, 2pm in SPL 59       Practice final
Registrar: final exam schedule