Mathematics of Machine Learning 2023
This is the main website for the Mathematics of Machine Learning course in the spring of 2023, as part of the bachelor of mathematics at the University of Amsterdam. Visit this page regularly for changes and updates.
|Instructor:||Tim van Erven||(tim@ No spam, please timvanerven. No really, no spam nl)|
|Teaching Assistant:||Jack Mayo||(j.j.mayo@ No spam, please uva. No really, no spam nl)|
Machine learning is one of the fastest growing areas of science, with far-reaching applications. This course gives an overview of the main techniques and algorithms. The lectures introduce the definitions and main characteristics of machine learning algorithms from a coherent mathematical perspective. In the exercise classes the algorithms will be implemented in Python and applied to a selection of data sets.
We will use Canvas for announcements, grades and submitting homework. There is also a Zoom link there for those who cannot attend in person, and there will be handwritten lecture notes.
Required Prior Knowledge
- Linear algebra, gradients, convexity
- Programming in Python
- Writing in LaTeX
Although mainly targeting mathematics students, the course is accessible to other science students (AI, CS, physics, …) with an interest in mathematical foundations of machine learning.
Lectures and Exercise Sessions
- Weekly lectures:
- weeks 6-12 from 9h00-11h00 on Tuesdays in room SP A1.04
- weeks 14-21 except May 1 from 9h00-11h00 on Mondays in room SP G3.02
- Weekly exercise classes on Fridays in room SP D1.116, except for the
first week and holidays:
- weeks 7-12 from 9h00-11h00
- weeks 14-21 from 11h00-13h00 (except April 7, April 28, May 5 and May 19)
The course grade consists of the following components:
- Homework assignments. H = Average of homework grades,
excluding the lowest homework grade.
- Two exams: midterm (M) and final (F).
The final grade is computed as 0.3H + 0.3M + 0.4F. If between 5 and 6, it is rounded to a whole point: 5 or 6. Otherwise it is rounded to half points.
Exams (closed book):
- Midterm: Thursday March 30, 13h00-15h00 in room REC C0.02 (Roeterseiland)
- Final exam: June 1, 18h00-21h00 in room SP L1.01
- Resit exam: July 4, 9h00-12h00 in room SP A1.18
The midterm will be about the first half of the course. The final exam will only be about the second half of the course. The resit exam (R) will cover both halves; it will replace both the midterm and the final exam, with final grade 0.3H + 0.7R. Both exams will be closed book, meaning that it is not allowed to use external resources during the exam.
The main book for the course is The Elements of Statistical Learning (ESL), 2nd edition, by Hastie, Tibshirani and Friedman, Springer-Verlag 2009. In addition, we will use selected parts from Ch. 18 of Computer Age Statistical Inference: Algorithms, Evidence and Data Science (CASI) by Efron and Hastie, Cambridge University Press, 2016. Some supplementary material will also be provided, as listed in the Course Schedule.
Both books are freely available online, but it is recommended to buy a paper copy of the ESL book, because you will need to study many of its chapters. The standard edition of ESL is hard cover, but there also exists a cheaper soft-cover edition for €39.99. To get the cheaper offer, open this link from inside the university network.
About using Wikipedia and other online sources: trust Wikipedia as much as you would trust a fellow student who is also still learning. Some things are good, but other things are poorly explained or plain wrong, so always verify with a trusted source (a book or scientific paper). This holds doubly for any ‘data science’ blogs you might find online.
This schedule is subject to change during the course. Literature marked ‘optional’ is recommended for background, but will not be tested on the exam. TBA=To Be Announced.
|Feb. 7||Supervised learning intro: classification and regression (overfitting 1), linear regression for classification (overfitting 2), nearest neighbor classification (overfitting 3).||
Sect. 2.1, 2.2, 2.3.
Curse of dimensionality.
Statistical decision theory: expected prediction error (overfitting 4), Bayes-optimal prediction rule.
Empirical Risk Minimization. Interpretation of least squares as ERM.
Sect. 2.4, 2.5.
Sect. 7.10.1, 7.10.2; optionally: 7.12.
|Feb. 21||Model selection for regression I: best-subset selection, ridge regression and lasso.||Sect. 3.1, 3.2 up to 3.2.1, 3.3, 3.4 up to 3.4.2.|
|Feb. 28||Model selection for regression II: comparison of best-subset/ridge/lasso, ridge and lasso as shrinkage methods, bias-variance decomposition.||Sect. 3.4.3. From lecture: derivation of formulas in Table 3.4, bias-variance decomposition. Optional: Sect. 1-3.4 about subgradients from Boyd and Vandenberghe lecture notes.|
Linear discriminant analysis (LDA).
Naive Bayes classifier, with application to spam filtering.
Sect. 4.1, 4.2, 4.3 (except 4.3.1, 4.3.2, 4.3.3).
Sect. 6.6.3; optionally: Wikipedia on Naive Bayes [1, 2] (see Wikipedia caveat).
|Sect. 4.4 (except 4.4.3).|
Decision trees for classification and regression.
|Mar. 30||Midterm Exam.|
Bagging and random forests.
Boosting (AdaBoost), boosting as forward stagewise additive modeling.
|Sect. 8.7, 10.1, 10.2, 10.3., 10.4, 10.5, 10.6 (in 10.6 only the part about classification).|
|Apr. 10||Easter, no lecture|
|Apr. 17||SVMs I: Optimal separating hyperplane, support vector machine (SVM), SVM learning as regularized hinge loss fitting.||Sect. 4.5.2, 12.2, 12.3.2.|
|Apr. 24||SVMs II: dual formulation, kernel trick.||Sect. 12.3.1. Optionally: Ch. 5 from Boyd and Vandenberghe book|
|May 1||Lecture-free Week|
Unsupervised learning: K-means clustering.
Sect. 14.3 before 14.3.1; Sect. 14.3.6. NB. The book gives the wrong definition for K-means in Sect. 14.3.6, see erratum.
Handout about stochastic optimization.
|May 15||Neural networks/deep learning I: gradient descent with backpropagation.||From Ch. 18 of the CASI book: chapter intro, Sect. 18.1, Sect. 18.2 (except accelerated gradient methods).|
Neural networks/deep learning II:
convolutional layers, generalization and overfitting, double descent.
|From Ch. 18 of the CASI book: 18.4.
Slides about double descent.
|Jun. 1||Final Exam.|
The homework assignments will be made available here. It is allowed to work together in pairs of two students, which can change per assignment. It is not allowed to collaborate with other people. In case you miss a deadline because of illness or other special circumstances, contact Tim to discuss possible solutions.
|Homework 1||Homework1-start.ipynb||17 Feb||23 Feb, 13h00|
|Homework 2||Homework2-start.ipynb||22 Feb||2 Mar, 13h00|
|Homework 3||-||28 Feb||9 Mar, 13h00|
|Homework 4||Homework4-start.ipynb||7 Mar||16 Mar, 13h00|
|Homework 5||-||16 Mar||23 Mar, 13h00|
|Homework 6||-||3 Apr||20 Apr, 13h00|
|Homework 7||-||17 Apr||26 Apr, 18h00 !|
|Homework 8||-||24 Apr||11 May, 13h00|
|Homework 9||-||8 May||25 May, 13h00|
Here is a list of references for advanced further reading. These are all optional, and will not be tested on the exam.
- Machine Learning Theory: I recommend the free book by Shalev-Shwartz and Ben-David, which we also use in the MasterMath course Machine Learning Theory.
- Convex optimization: the free book by Boyd and Vandenberghe provides a very nice introduction. For a more extensive overview, see the free book by Bubeck.
- Deep learning: if you want to get up to date on the practice of deep learning, I recommend the Dive into Deep Learning interactive online book.