ES 335 · Machine learning
  • Home
  • Lectures
  • Grading
  • FAQ
  • Deadlines
  • Instructor

Lecture library

Every lecture of ES 335 Machine learning, August to November 2025, with its slides, notebooks, cheat sheet and short videos.

Each row is one lecture, grouped by part of the course. The slide handouts and notebooks are from ml-teaching, which also lists all slides and all notebooks. The Shorts are also collected, in course order, on the Machine learning in 1 minute page and in a YouTube playlist.

Slides: lecture handouts (PDF) · Notebooks: worked code · Apps: interactive demos · Cheat sheet: a two-page A4 summary (PDF) · Shorts: one-minute videos, each answering one question; point at a number to see the question.

Foundations

No. Lecture Resources
0 25 Jul Prerequisite test An open-book test on Python, linear algebra, probability and calculus, required to enrol. Test
1 6 Aug Introduction and logistics What machine learning is, how the course runs, and a tour of what current models can do. Slides Notebooks Transcription and local LLMs, Segmentation and localization, Prompt to image Shorts 1 2
2 7 Aug Conventions, metrics, classification and regression Notation for data, train and test sets, the confusion matrix, accuracy, precision and recall, and errors for regression. Slides Notebooks Rule-based vs ML, Confusion matrix, Dummy baselines Cheat sheet Shorts 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Trees, model fit and ensembles

No. Lecture Resources
3 8 Aug Decision trees I Entropy, information gain, and growing a tree one greedy question at a time. Slides Notebooks Entropy, Real output, Real input, discrete output Cheat sheet Shorts 1 2 3 4
4 13 Aug Decision trees II Real-valued inputs and outputs, Gini impurity, and how depth leads to overfitting. Slides Notebooks Overfitting and underfitting Cheat sheet Shorts 1 2 3
5 14 Aug Bias and variance I; cross-validation Underfitting and overfitting, the bias-variance decomposition, k-fold cross-validation and tuning hyperparameters. Slides Bias and variance I, Cross-validation Notebooks Tuning hyperparameters, Bias-variance analysis, Bias-variance charts Cheat sheets Bias and variance, Cross-validation and hyperparameters Shorts 1 2 3 4 5 6
6 20 Aug Ensemble learning Bagging, random forests and boosting, and why a vote of many models beats one. Slides Notebooks Boosting explained, Feature importance, Ensemble representation Cheat sheet Shorts 1 2 3 4 5
7 21 Aug Decision tree pruning; bias and variance II Cutting a grown tree back, and a second look at the bias-variance trade-off. Slides Tree pruning, Bias and variance II Notebooks Tree pruning Cheat sheets Decision trees II, Bias and variance Shorts 1 2

Linear models and optimisation

No. Lecture Resources
8 22 Aug Maths for ML Gradients of linear and quadratic forms, rank, contour plots, and the time complexity of decision trees. Slides Maths for ML, Contours and gradients, Tree time complexity Notebooks Contour plots, Meshgrid and contours Cheat sheet Shorts 1
9 27 Aug Linear regression I Least squares, the normal equation, and what one outlier does to the fit. Slides Notebooks Tree pruning Cheat sheet Shorts 1 2 3
10 28 Aug Linear regression II The geometric view, basis functions, multicollinearity and dummy variables. Slides Notebooks Geometric linear regression, Basis expansion, Basis expansion 2, Dummy variables Cheat sheets Linear regression I, Linear regression II Shorts 1 2
11 29 Aug Gradient descent From Taylor series to the update rule, the step size, and batch, mini-batch and stochastic gradient descent. Slides Notebooks Taylor series, Contours and gradient descent Cheat sheet Shorts 1 2 3 4
12 3 Sep Movie recommendation and matrix factorisation Filling in a ratings matrix with low-rank factors, fit by alternating least squares or gradient descent. Slides Notebooks Movie recommendation Cheat sheet Shorts 1
13 10 Sep Ridge regression A penalty on large weights: the closed form, shrinkage and choosing the penalty. Slides Notebooks Ridge regression Cheat sheet Shorts 1 2
14 11 Sep Lasso regression The L1 penalty and sparse weights, subgradients, coordinate descent and feature selection. Slides Notebooks Lasso regression Cheat sheet Shorts 1 2
15 12 Sep Constrained optimisation Lagrange multipliers and the KKT conditions. Slides Cheat sheet

Classification

No. Lecture Resources
16 17 Sep Logistic regression I The sigmoid, odds and the decision boundary, and why linear regression fails for classes. Slides Notebooks Why use logits, Logistic regression in Torch Cheat sheet Shorts 1 2 3
17 8 Oct Logistic regression II Cross-entropy from maximum likelihood, its gradient, and softmax for many classes. Slides Notebooks Why use logits, Logistic regression in Torch Cheat sheet Shorts 1 2
18 9 Oct Convexity, Hessians and IRLS Tutorial: testing convexity, Newton's method, and iteratively reweighted least squares. Slides Notebooks Second-order logistic regression Cheat sheet Shorts 1
19 10 Oct Precision-recall curves Thresholds, the precision-recall trade-off, average precision and ROC curves. Slides Notebooks PR curves Cheat sheet Shorts 1 2

Neural networks

No. Lecture Resources
20 15 Oct Multi-layer perceptrons Perceptrons, XOR and hidden layers, activations, and the forward pass as matrices. Slides Notebooks Perceptron learning algorithm Cheat sheet Shorts 1 2 3 4 5
21 16 Oct Automatic differentiation Computation graphs, the chain rule, and forward versus reverse mode. Slides Notebooks Autodiff Cheat sheet Shorts 1 2 3
22 17 Oct Autograd from scratch Building a small reverse-mode autograd engine in Python. Notebooks Autograd from scratch Cheat sheet
23 22 Oct Next-token prediction A character-level model of names: embeddings, an MLP, and sampling. Slides Notebooks Names Apps Next-token demo Cheat sheet Shorts 1
24 23 Oct Convolutional networks I Convolution as a sliding dot product, stride, padding, pooling, weight sharing and LeNet. Slides Notebooks 1D CNN, Edge detection, LeNet Apps Convolution, Multi-channel convolution Cheat sheet Shorts 1 2
25 24 Oct Grad-CAM, equivariance and invariance Seeing which pixels a CNN relies on, and how convolution treats shifted inputs. Notes Apps Grad-CAM, Grad-CAM enhanced
26 24 Oct Pretrained features with DINOv3 Using a frozen vision model's features for search, classification and regression. Notebooks Classification, Regression, Data Apps Visual fashion search, Patch similarity Shorts 1

Unsupervised and reinforcement learning

No. Lecture Resources
27 29 Oct Unsupervised learning: clustering K-means and choosing k, and clustering by density. Slides Apps Simple image clustering, Image clustering, Document clustering Cheat sheet Shorts 1 2 3
28 30 Oct Principal component analysis Tutorial: directions of maximum variance, eigenvectors of the covariance, and explained variance. Slides Notebooks PCA 1, PCA 2 Cheat sheet
29 31 Oct Reinforcement learning Agents and rewards, returns, value functions, Q-learning and exploration. Slides Apps Flappy Bird, RL demo, Exploration Cheat sheet Shorts 1 2

Neighbours and support vector machines

No. Lecture Resources
30 6 Nov K-nearest neighbours Distance metrics, choosing k, the curse of dimensionality and approximate search. Slides KNN, Approximate KNN Notebooks Curse of dimensionality Cheat sheet Shorts 1 2 3 4 5
31 12 Nov Support vector machines I The maximum-margin classifier, its dual, and support vectors. Slides Notebooks SVM, SVM with CVXOPT Cheat sheet Shorts 1 2
32 13 Nov Support vector machines II: kernels Feature maps, the kernel trick, and polynomial and RBF kernels. Slides Notebooks Understanding kernels, Kernels, Primal and dual Cheat sheet Shorts 1
33 14 Nov Support vector machines III: soft margin Slack variables, the C parameter and the hinge loss. Slides Notebooks Soft margin Cheat sheet Shorts 1

Also in the series

Topics with a cheat sheet or Shorts that were not separate lectures in 2025.

No. Topic Resources
Naive Bayes and Bayesian networks Bayes' rule for classification, conditional independence, and smoothing counts. Cheat sheet Shorts 1 2
Time series and sequence models Forecasting baselines, autoregression, and recurrent networks. Cheat sheet Shorts 1 2
Object detection Bounding boxes and how much two of them overlap. Shorts 1

Quizzes

Quiz Date Solution
1 4 Sep Quiz 1 solution
2 25 Sep Quiz 2 solution
3 24 Oct Quiz 3 solution
4 28 Nov Quiz 4 solution

Assignments

Assignment Handed out Due Link
1 19 Aug 28 Aug Assignment 1
2 30 Sep 14 Oct Assignment 2
3 17 Oct 4 Nov Assignment 3

ES 335 Machine learning · IIT Gandhinagar · August 2025

 

© 2025 Nipun Batra · Made with Quarto