Introduction 1
Introduction 1
Kevin Smith, Gustav Henter, Florian Pokorny KTH Royal Institute of Technology
1. Introduction
2. Course structure
5. Brushing up on prerequisites
Teaching Team: Course Responsible Teachers
Page 1/50
Teaching Team: TAs
Rafael Cabral Muchacho Jingyu (Jim) Guo Emir Konuk Robert Welch
Page 2/50
Who is this course for?
Page 3/50
Who is this course for?
Page 3/50
Who is this course for?
Page 3/50
Who is this course for?
Page 3/50
Who is this course for?
Page 3/50
Who is this course for?
Page 3/50
Who is this course for?
Page 3/50
Who is this course for?
• You want to learn the ins and outs of Tensorflow/Pytorch and train
deep nets?
Page 3/50
Who is this course for?
• You want to learn the ins and outs of Tensorflow/Pytorch and train
deep nets? NO
Page 3/50
Page 4/50
Structure of a typical module
Page 5/50
Walkthrough: Canvas and Notion Pages
https://dd1420.notion.site/dd1420/
https://canvas.kth.se/courses/55922 DD1420-Lecture-Notes-b555e017345a4119950ce8fd67133275
Page 6/50
Grading Summary
PRO1 1.5 credits - Complete all lesson assignments (video lectures and
lecture notes) and pass all practice quizzes with a score of at least
70%. Grade: P/F.
Page 7/50
Grading Summary
PRO1 1.5 credits - Complete all lesson assignments (video lectures and
lecture notes) and pass all practice quizzes with a score of at least
70%. Grade: P/F.
INL1 3.0 credits - Exercises. Exercises. This component includes both the
completion of exercises (40% of the grade) and performance on oral
examinations (60% of the grade). Grade: A, B, C, D, E, F.
Page 7/50
Grading Summary
PRO1 1.5 credits - Complete all lesson assignments (video lectures and
lecture notes) and pass all practice quizzes with a score of at least
70%. Grade: P/F.
INL1 3.0 credits - Exercises. Exercises. This component includes both the
completion of exercises (40% of the grade) and performance on oral
examinations (60% of the grade). Grade: A, B, C, D, E, F.
TES1 3.0 credits - Summary Quizzes. These quizzes test your knowledge
and understanding of the course material. Grade: A, B, C, D, E, F.
Page 7/50
Grading Scale
A 90-100%
B 80-89%
C 70-79%
D 60-69%
E 50-59%
Fx is not offered, but we offer two course runs/year to retake the courses.
Page 8/50
Tasks for this week
Page 9/50
Motivations for Machine Learning and Definition of
the term?
Page 10/50
What is Machine Learning?
Arthur Samuel, 1959: “the field of study that gives computers the
ability to learn without explicitly being programmed.”
Interesting early work: "Some Studies in Machine Learning Using the Game of Checkers".
IBM Journal of Research and Development. 1959, 3 (3): 210–229.
Page 11/50
What is Machine Learning?
Page 12/50
What is Machine Learning?
Not examples according to this definition: Some methods you may still
think of as being “intelligent” or part of “AI”
Page 12/50
What is Machine Learning?
Not examples according to this definition: Some methods you may still
think of as being “intelligent” or part of “AI”
i.e.:
Page 12/50
What is Machine Learning?
Not examples according to this definition: Some methods you may still
think of as being “intelligent” or part of “AI”
i.e.: Manually programmed chat bot, aspects of Game Theory, Vanilla
Search, Motion Planning, Optimization - if these methods do not improve
with experience E.
Page 12/50
What are some examples of modern machine learning?
Page 13/50
Waymo’s Selfdriving Car
• OpenAI’s ChatGPT
Page 16/50
Many many examples...
• OpenAI’s ChatGPT
• Automated translation
Page 16/50
Many many examples...
• OpenAI’s ChatGPT
• Automated translation
Page 16/50
Many many examples...
• OpenAI’s ChatGPT
• Automated translation
• ...
Page 16/50
Most basic categorization of ML methods?
Page 17/50
Supervised Learning
Learn a function f : X → Y from example input output pairs
(x1 , y1 ), . . . , (xn , yn ) ∈ X × Y.
• Predict the temperature tomorrow based on the temperature of the
last d days.
Page 18/50
Supervised Learning
Learn a function f : X → Y from example input output pairs
(x1 , y1 ), . . . , (xn , yn ) ∈ X × Y.
• Predict the temperature tomorrow based on the temperature of the
last d days. What is f ?
Page 18/50
Supervised Learning
Learn a function f : X → Y from example input output pairs
(x1 , y1 ), . . . , (xn , yn ) ∈ X × Y.
• Predict the temperature tomorrow based on the temperature of the
last d days. What is f ? X = Rd , Y = R.
Page 18/50
Supervised Learning
Learn a function f : X → Y from example input output pairs
(x1 , y1 ), . . . , (xn , yn ) ∈ X × Y.
• Predict the temperature tomorrow based on the temperature of the
last d days. What is f ? X = Rd , Y = R.
• Learn to diagnose if a medical conditions is present or not from
imaging data.
Page 18/50
Supervised Learning
Learn a function f : X → Y from example input output pairs
(x1 , y1 ), . . . , (xn , yn ) ∈ X × Y.
• Predict the temperature tomorrow based on the temperature of the
last d days. What is f ? X = Rd , Y = R.
• Learn to diagnose if a medical conditions is present or not from
imaging data. What is f ?
Page 18/50
Supervised Learning
Learn a function f : X → Y from example input output pairs
(x1 , y1 ), . . . , (xn , yn ) ∈ X × Y.
• Predict the temperature tomorrow based on the temperature of the
last d days. What is f ? X = Rd , Y = R.
• Learn to diagnose if a medical conditions is present or not from
imaging data. What is f ? X = photographs, Y = {true, false}
Page 18/50
Supervised Learning
Learn a function f : X → Y from example input output pairs
(x1 , y1 ), . . . , (xn , yn ) ∈ X × Y.
• Predict the temperature tomorrow based on the temperature of the
last d days. What is f ? X = Rd , Y = R.
• Learn to diagnose if a medical conditions is present or not from
imaging data. What is f ? X = photographs, Y = {true, false}
• Synthesize spoken audio from text.
Page 18/50
Supervised Learning
Learn a function f : X → Y from example input output pairs
(x1 , y1 ), . . . , (xn , yn ) ∈ X × Y.
• Predict the temperature tomorrow based on the temperature of the
last d days. What is f ? X = Rd , Y = R.
• Learn to diagnose if a medical conditions is present or not from
imaging data. What is f ? X = photographs, Y = {true, false}
• Synthesize spoken audio from text. What is f ?
Page 18/50
Supervised Learning
Learn a function f : X → Y from example input output pairs
(x1 , y1 ), . . . , (xn , yn ) ∈ X × Y.
• Predict the temperature tomorrow based on the temperature of the
last d days. What is f ? X = Rd , Y = R.
• Learn to diagnose if a medical conditions is present or not from
imaging data. What is f ? X = photographs, Y = {true, false}
• Synthesize spoken audio from text. What is f ? X = text, Y = audio.
Page 18/50
Supervised Learning
Learn a function f : X → Y from example input output pairs
(x1 , y1 ), . . . , (xn , yn ) ∈ X × Y.
• Predict the temperature tomorrow based on the temperature of the
last d days. What is f ? X = Rd , Y = R.
• Learn to diagnose if a medical conditions is present or not from
imaging data. What is f ? X = photographs, Y = {true, false}
• Synthesize spoken audio from text. What is f ? X = text, Y = audio.
• Determine motor currents to enable a robot arm to reach with its
hand to a given position.
Page 18/50
Supervised Learning
Learn a function f : X → Y from example input output pairs
(x1 , y1 ), . . . , (xn , yn ) ∈ X × Y.
• Predict the temperature tomorrow based on the temperature of the
last d days. What is f ? X = Rd , Y = R.
• Learn to diagnose if a medical conditions is present or not from
imaging data. What is f ? X = photographs, Y = {true, false}
• Synthesize spoken audio from text. What is f ? X = text, Y = audio.
• Determine motor currents to enable a robot arm to reach with its
hand to a given position. What is f ?
Page 18/50
Supervised Learning
Learn a function f : X → Y from example input output pairs
(x1 , y1 ), . . . , (xn , yn ) ∈ X × Y.
• Predict the temperature tomorrow based on the temperature of the
last d days. What is f ? X = Rd , Y = R.
• Learn to diagnose if a medical conditions is present or not from
imaging data. What is f ? X = photographs, Y = {true, false}
• Synthesize spoken audio from text. What is f ? X = text, Y = audio.
• Determine motor currents to enable a robot arm to reach with its
hand to a given position. What is f ? X = Rd , Y = Rm .
Page 18/50
Supervised Learning
Page 19/50
Supervised Learning
Page 19/50
Supervised Learning
Page 19/50
Supervised Learning
Page 19/50
Supervised Learning
Page 19/50
Can we also learn without labels yi ∈ Y ?
Page 20/50
Unsupervised Learning
Page 21/50
Unsupervised Learning
• Examples:
Page 21/50
Unsupervised Learning
Page 21/50
Unsupervised Learning
Page 21/50
Unsupervised Learning
Page 22/50
Unsupervised Learning
• Examples:
Page 22/50
Unsupervised Learning
Page 22/50
Unsupervised Learning
Page 22/50
Some Milestones
1950s-1970s: Initial Euphoria
Page 23/50
Some Milestones
1950s-1970s: Initial Euphoria
Page 23/50
Some Milestones
1950s-1970s: Initial Euphoria
Page 23/50
Some Milestones
1950s-1970s: Initial Euphoria
Page 23/50
Some Milestones
1950s-1970s: Initial Euphoria
Page 23/50
Some Milestones
1974-1980: First AI Winter
Page 24/50
Some Milestones
1974-1980: First AI Winter
• Reduction in funding
Page 24/50
Some Milestones
1974-1980: First AI Winter
• Reduction in funding
Page 24/50
Some Milestones
1974-1980: First AI Winter
• Reduction in funding
Page 24/50
Some Milestones
Page 25/50
Some Milestones
• Hopfield networks
Page 25/50
Some Milestones
• Hopfield networks
Page 25/50
Some Milestones
Page 26/50
Some Milestones
1993-2011: Real World Use cases with limits
Page 27/50
Some Milestones
1993-2011: Real World Use cases with limits
Page 27/50
Some Milestones
1993-2011: Real World Use cases with limits
• Moore’s law
Page 27/50
Some Milestones
1993-2011: Real World Use cases with limits
• Moore’s law
Page 27/50
Some Milestones
2011-: Breakthroughs in scale and methodology
Page 28/50
Some Milestones
2011-: Breakthroughs in scale and methodology
Page 28/50
ML Today
• True societal and commercial impact
http://www.
incompleteideas.
net/IncIdeas/
IEEE Spectrum, 20 Oct 2014
BitterLesson.html
Page 29/50
ML Today
• True societal and commercial impact
• Hybrid Deep Learning + X, where X is
probabilistic, geometric, optimization
http://www.
incompleteideas.
net/IncIdeas/
IEEE Spectrum, 20 Oct 2014
BitterLesson.html
Page 29/50
ML Today
• True societal and commercial impact
• Hybrid Deep Learning + X, where X is
probabilistic, geometric, optimization
• Breakneck publication speed
http://www.
incompleteideas.
net/IncIdeas/
IEEE Spectrum, 20 Oct 2014
BitterLesson.html
Page 29/50
ML Today
• True societal and commercial impact
• Hybrid Deep Learning + X, where X is
probabilistic, geometric, optimization
• Breakneck publication speed
• Mathematical foundations and
explainability?
http://www.
incompleteideas.
net/IncIdeas/
IEEE Spectrum, 20 Oct 2014
BitterLesson.html
Page 29/50
ML Today
• True societal and commercial impact
• Hybrid Deep Learning + X, where X is
probabilistic, geometric, optimization
• Breakneck publication speed
• Mathematical foundations and
explainability?
http://www.
• Are we again overestimating what
incompleteideas.
net/IncIdeas/
current methods can do?
IEEE Spectrum, 20 Oct 2014
BitterLesson.html
Page 29/50
ML Today
• True societal and commercial impact
• Hybrid Deep Learning + X, where X is
probabilistic, geometric, optimization
• Breakneck publication speed
• Mathematical foundations and
explainability?
http://www.
• Are we again overestimating what
incompleteideas.
net/IncIdeas/
current methods can do?
IEEE Spectrum, 20 Oct 2014
BitterLesson.html • Concerns about ethics, data privacy,
bias in ML come to the fore
Page 29/50
ML Today
• True societal and commercial impact
• Hybrid Deep Learning + X, where X is
probabilistic, geometric, optimization
• Breakneck publication speed
• Mathematical foundations and
explainability?
http://www.
• Are we again overestimating what
incompleteideas.
net/IncIdeas/
current methods can do?
IEEE Spectrum, 20 Oct 2014
BitterLesson.html • Concerns about ethics, data privacy,
bias in ML come to the fore
• A very exciting but challenging time to
study and teach Machine Learning!
Page 29/50
Landscape of Machine Learning?
Page 30/50
Ingredients of Machine Learning
Page 31/50
Ingredients of Machine Learning
Page 32/50
Ingredients of Machine Learning
Page 33/50
1. Introduction (this week)
Page 34/50
1. Introduction (this week)
Page 34/50
1. Introduction (this week)
Page 34/50
1. Introduction (this week)
Page 34/50
1. Introduction (this week)
Page 34/50
1. Introduction (this week)
Page 34/50
Page 35/50
Page 36/50
Page 37/50
Programming in Python
Page 38/50
Programming in Python
Page 38/50
Programming in Python
Page 38/50
2. ML & Optimization
• Optimization Basics
Page 39/50
2. ML & Optimization
• Optimization Basics
• Gradient-based Optimization
Page 39/50
2. ML & Optimization
• Optimization Basics
• Gradient-based Optimization
• Constrained Optimization
Page 39/50
2. ML & Optimization
• Optimization Basics
• Gradient-based Optimization
• Constrained Optimization
• Duality and Quadratic
Programming
Page 39/50
2. ML & Optimization
• Optimization Basics
• Gradient-based Optimization
• Constrained Optimization
• Duality and Quadratic
Programming
• Other Techniques
Page 39/50
3. ML & Generalization
• Intro to Generalization
Page 40/50
3. ML & Generalization
• Intro to Generalization
• Generalization Basics
Page 40/50
3. ML & Generalization
• Intro to Generalization
• Generalization Basics
• Learning theory
Page 40/50
3. ML & Generalization
• Intro to Generalization
• Generalization Basics
• Learning theory
• Generalization in Practice
Page 40/50
3. ML & Generalization
• Intro to Generalization
• Generalization Basics
• Learning theory
• Generalization in Practice
Page 40/50
4. ML & Neural Networks
Page 41/50
4. ML & Neural Networks
Page 41/50
4. ML & Neural Networks
Page 41/50
4. ML & Neural Networks
Page 41/50
5. ML & Geometry
Page 42/50
5. ML & Geometry
Page 42/50
5. ML & Geometry
Page 42/50
5. ML & Geometry
Page 42/50
6. ML & Kernel Methods
Page 43/50
6. ML & Kernel Methods
Page 43/50
6. ML & Kernel Methods
Page 43/50
6. ML & Kernel Methods
Page 43/50
6. ML & Kernel Methods
Page 43/50
7. ML & Probability
Page 44/50
7. ML & Probability
Page 44/50
7. ML & Probability
Page 44/50
7. ML & Probability
Page 44/50
8. ML & Information Theory
• Introduction
Page 45/50
8. ML & Information Theory
• Introduction
• Fundamentals of Information
Theory
Page 45/50
8. ML & Information Theory
• Introduction
• Fundamentals of Information
Theory
• Decision Trees
Page 45/50
8. ML & Information Theory
• Introduction
• Fundamentals of Information
Theory
• Decision Trees
Page 45/50
9. ML & Data Generation
Image: “Astronaut Riding a Horse (SDXL)”, Stable Diffusion, CC0 1.0 Author: VulcanSphere,
available on Wikipedia Stable Diffusion article
Page 46/50
9. ML & Data Generation
Image: “Astronaut Riding a Horse (SDXL)”, Stable Diffusion, CC0 1.0 Author: VulcanSphere,
available on Wikipedia Stable Diffusion article
Page 46/50
9. ML & Data Generation
Image: “Astronaut Riding a Horse (SDXL)”, Stable Diffusion, CC0 1.0 Author: VulcanSphere,
available on Wikipedia Stable Diffusion article
Page 46/50
Our Main Expected Learning Outcomes (see syllabus)
Page 47/50
Our Main Expected Learning Outcomes (see syllabus)
Page 47/50
Our Main Expected Learning Outcomes (see syllabus)
Page 47/50
Some ML courses to take after this course
Page 48/50
Questions?
Page 49/50