A handson introduction to modern pattern recognition. We begin in medias res by training two intuitive classifiers (a perceptron and a kNN classifier) to recognize digits. To determine which one is better we must state what "better" means, so we introduce "generalization." To talk about generalization we need to build the probabilistic framework in which modern pattern recognition resides. From here the plan is clear: we imagine that probabilistic descriptions of data (that is, the knowledge) is given to us and derive optimal classifiers. We then move to supervised learning from training samples, linear classification and regression, feature design (especially the multiscale or spectral perspective which has seen great success for images, audio, text, ..., and which has beautiful connections to physics). We apply our probabilistic models to problems in image restoration—denoising, demosaicking, deblurring, as well as—time permitting—segmentation. We then eschew feature design in favor of deep neural networks. Finally, we pivot back to solid ground and ask: what good are probabilistic description of the world if we cannot generate samples from them? This leads us to consider sampling methods such as Markov chain Monte Carlo.
Schedule
W  Topic  Additional material  Assignment 

1 
T: Introduction: the ingredients (slides, video 1, video 2) Recitation: A refresher on linear algebra and probability (ipynb)

Notebook: kNearest Neigbours Chapter 1 [PPA] 
Sample assignment (link) 
2 
T: Curse of dimensionality, perceptron (video 1, video 2) Recitation: Sample assignment hints & Gradescope help

Notebooks: MNIST & Perceptron, Cat and Dog People Chapter 2 in [PPA]

Sample assignment due  28.09 
3 
T: Decision theory, optimal classification (video 1, video 2) Recitation: 1st assignment hints

Notebook: Needle in a Haystack Chapter 2 in [PPA]


4 
T: ROC curves, linear regression (video 1, video 2) Recitation: Solve sample assignment 
Notebook: Linear and logistic regression 
Grade sample assignment  09.10 1st assignment due  12.10 
5 
T: geometric and probabilistic perspectives on linear regression + MNIST and onehot encoding (video 1, video 2) Recitation: 2nd assignment hints 
Notebook: Logistic regression scribbles Chapter 8 in [MML] 
Grade 1st assignment  16.10

6 
T: logistic regression, gradient descent (video 1, video 2, video 3) Recitation: Solve 1st assignment 
Notebook: Edge detection Chapter 7 in [MML] Chapter 8 in [MML] 
2nd assignment due  26.10 
7 
T: convolution, DTFT, DFT (video; NB: unfortunately the microphone was off during the initial recap part; notes will cover it) Recitation: 3rd assignment hints 
Notebook: Convolution and Fourier transform Discrete Fourier Transform (link) Chapter 3 in [FSP] 

8 
T: Fourier transform interpretations + Wiener filtering (video 1, video 2)
Recitation: Solve 2nd assignment 
Chapter 3 in [FSP] 
Grade 2nd assignment  06.11 3rd assignment due  09.11 
9 
T: machine learning bootcamp 1 (notebook,video) Recitation: 4th assignment hints 
OpenOndemand portal (VPN required) Scicore cluster install instructions

Grade 3rd assignment  13.11

10 
T: unsupervised learning, autoencoders (video 1, video 2) Recitation: Solve 3rd assignmnet 

4th assignment due  23.11 
11 
F: autoencoders and PCA (video 1, video 2) Recitation: 5th assignment hints 

Grade 4th assignment  27.11

12 
T: nonlinear (deep) autoencoders (video 1, video 2) Recitation: Solve 4th assignment 

5th assignment due  07.12 
13 
T: variational autoencoders (video 1, video 2) Recitation: 6th assignment hints 

Grade 5th assignment  11.12

14 
T: transformers (video) Recitation: Solve 5th assignment


6th assignment due  21.12

Prerequisites
We will assume familiarity with basic probability and linear algebra. We will review the most important concepts along the way but these reviews cannot replace entire courses. All programming examples and assignments will be in Python.
Resources
The course materials will be posted to this gitlab repo. While we will provide the required notes and recordings, we will also recommend reading from textbooks and other sources that are freely available online.
[MML] Machine Learning: A Probabilistic Perspective (2012) by Kevin Murphy; see also newer books by the same author, available online.
[ESL] Elements of Statistical Learning by Hastie, Tibshirani, and Friedman: A legendary ML textbook. See also a shorter introductory text by the same authors, Introduction to Statistical Learning.
[PPA] Patterns, Predictions, and Actions: A graduate textbook by Moritz Hardt and Ben Recht, somewhat advanced for this course but great reading nonetheless if you like that sort of stuff and you're not seeing it for the first time.
[FPS] Foundations of Signal Processing: A signal processing textbook by Vetterli, Kovaˇcevi´c and Goyal.
[CVAA] Computer Vision: Algorithms and Applications, 2nd Edition, by Richard Szeleski.
[ISL] An Introduction to Statistical Learning with Applications in Python by James, Witten, Hastie, Tibshirani and Taylor.
Math Resources:
The course uses a lot of probability and linear algebra; hence to be comfortable with the basics, we provide links to supplementary materials. However, for a much more comprehensive set of resources, you can find them in Jonathan Shewchuk's 'Introduction to Machine Learning' course. For your convinience, we have included some of those links below:
 Probability theory and linear algebra review from Standford Machine learning course
 Mathematics for Machine Learning by Garrett Thomas
For discussions about the lectures and excercises you can use the Piazza forum. Please do not send email unless you're asking a really personal question
Both coding and written assignments must be submitted through Gradescope.
Class time and location
Tuesday lecture will be given in Kollegienhaus, Hörsaal 118 and Friday lecture will be in Kollegienhaus, Hörsaal 115.
Tuesday lecture takes place from 08.15 am to 10.00 am. Friday lecture takes place from 10.15 am to 12.00 pm.
Exercise sessions will take place on Monday, 2.15 pm  4.00 pm in Pharmazentrum, Labor U1075 and Wednesday, 4.15 pm  6.00pm in Spiegelgasse 5, Seminarraum 05.002.
Contact
Lecturer
Prof. Dr. Ivan Dokmanić: ivan.dokmanic[at]unibas.ch
Teaching assistants
Roman Fries: r.fries[at]unibas.ch
Alexandra Spitzer: alexandra.spitzer[at]stud.unibas.ch
Vinith Kishore: vinith.kishore[at]unibas.ch
Cheng Shi: cheng.shi[at]unibas.ch
Valentin Debarnot: valentin.debarnot[at]unibas.ch