A hands-on 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 (video 1, video 2)
F: k-Nearest neighbors, curse of dimensionality (video 1, video 2)

Recitation: A refresher on linear algebra and probability (ipynb)

Lecture notes: Week 1 (to be updated)

 

Notebook: 

Chapter 1 [PPA]
Chapter 1.4.1-1.4.3 [MML]
Chapter 1.4.7 in [MML]

Last year's lecture:
T: video 1, video 2
F: video

 

Sample assignment 

due - 26.09.24

2

T: Curse of dimensionality, perceptron (video; the microphone was off in the first ~30min; see last year's videos on the right)
F: Perceptron, overfitting and Clever Hans (video 1, video 2)

F: Perceptron, decision theory

Lecture notes: Week 2  (to be updated)

Recitation: Sample assignment hints & Gradescope help

Chapter 2 in [PPA]
Chapter 5.7 in [MML]

Last year's lecture:

T: video 1, video 2 
F: video 1, video 2

Assignment 1

due - 10.10.24

3

T: Decision theory, optimal classification
F: Likelihood ratio tests, ROC curves

Lecture notes: Week 3  (to be updated)

Recitation: 1st assignment hints 

Chapter 2 in [PPA]
Chapter 5.7 in [MML]

Last year's lecture:

T: video 1, video 2
F: video 1, video 2

 

 

4

T: ROC curves, linear regression (video 1, video 2)
F: multivariate linear regression, geometric perspective (video 1, video 2)

Lecture notes: Week 4  (to be updated)

Recitation: Solve sample assignment 

Chapter 2 in [PPA]
Chapter 5.7 in [MML]
Chapter 7 in [MML]

Last year's lecture:

T: video 1, video 2
F: video 1, video 2

Assignment 2

due - 24.10.24

5

T: geometric and probabilistic perspectives on linear regression + MNIST and one-hot encoding (video 1, video 2)
F: interpretations of one-hot encodings, logistic regression (video 1, video 2; from last year due to a microphone issue)

Lecture notes: Week 5 (to be updated)

Recitation: 2nd assignment hints 

 

Chapter 7 in [MML]
Chapter 8 in [MML]

Last year's lecture:

T: video 1, video 2
F: video 1, video 2

F (silent, per request): video 1, video 2

 

6

T: logistic regression, gradient descent (video 1, video 2)
F: recap logistic regression, nonlinear filtering to break the barrier (video 1, video 2)

Recitation: Solve 1st assignment

 

Lecture notes: Week 6 (to be updated)

Chapter 7 in [MML]

Chapter 8 in [MML]

Last year's lecture:

T: video 1, video 2, video 3
F: video 1, video 2

Example questions for the midterm exam

 

Assignment 3

due - 14.11.24

7

T: Towards good features: nonlinear filtering, edges (video 1, video 2)
F: Convolution, DTFT, DFT (video 1, video 2)

Recitation: 3rd assignment hints

Lecture notes: Week 7 (to be updated)

Discrete Fourier Transform (link)

Chapter 3 in [FSP]

Last year's lecture:

T: video
F: video 1, video 2

 

8

T: Midterm exam (05.11.24)   
F:  Fourier transform interpretations, eigenfunctions, matrix formulations, ... (video 1, video 2)

Recitation: Solve 2nd assignment

Lecture notes: 

 

Last year's lecture:


F: video 1video 2

 

9

T: Machine learning bootcamp part 1 (video 1, video 2)
F: Machine learning bootcamp part 2 (video)

Recitation: 4th assignment hints 

Lecture notes: 

 

Last year's lecture:

T: video
F: video

Assignment 4

due - 21.11.2024

10

T: DFT, circular convolution, .. (video)
F: Wiener filtering (video 1, video 2

Recitation: Solve 3rd assignmnet 

Lecture notes: 

Last year's lecture:

T: videovideo 1video 2
F:  video 1video 2

Assignment 5

due - 05.12.2024

11

T: Wiener filtering (video 1)  and autoencoders (video 2)
 

Recitation: 5th assignment hints

Lecture notes: 

Last year's lecture:

T: video 1video 2
F: video 1video 2

 

12

T: Autoencoders and PCA (video 1, video 2)
F: PCA (video 1, video 2)

Recitation:  Solve 4th assignment

Lecture notes: 

Last year's lecture:

T: video 1video 2
F: video

Assignment 6

due - 19.12.2024

13

T: More about PCA (video 1, video 2)
F: Recap on autoencoders, generative modeling,
    PCA and SVD (video 1, video 2)

Recitation: 6th assignment hints

Lecture notes: 

Last year's lecture:

T: video 1video 2
F: video 1video 2

 

14

T: Transformers (video), additional reading material on diffusion
models (blog post)
F: Results of the evaluation, Q & A

Recitation: Solve 5th assignment

Lecture notes: 

Last year's lecture:

T: - 
F: -

 

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:

For discussions about the lectures and excercises you can use the Piazza forum. Please do not send e-mail unless you're asking a really personal question

Both coding and written assignments must be submitted through Gradescope.

 

 

Contact

Lecturer

Prof. Dr. Ivan Dokmanić: ivan.dokmanic[at]unibas.ch

 

Teaching assistants

Mark Starzynski: mark.starzynski[at]unibas.ch 

Marko Janic: marko.janic[at]stud.unibas.ch

Alexandra Spitzer: alexandra.spitzer[at]unibas.ch

Vinith Kishore: vinith.kishore[at]unibas.ch

Class time and location

Lectures will be given in Kollegienhaus, Hörsaal 118

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 Biozentrum, Seminarraum 02.073 and Wednesday, 4.15 pm - 6.00pm in Spiegelgasse 5, Seminarraum 05.002.

 

 

Grade

Homework assignment 25%
Midterm exam 30%
Final exam 45%

Exam dates

The midterm exam will take place on 05.11.24 during regular lecture hours.

The final exam will take place on 21.01.25, 14-16h.