ml19 Part01 Intro
ml19 Part01 Intro
Augmented Computing
Introduction
09.10.2019
Winter ‘19
and Sensory
Learning
Bastian Leibe
RWTH Aachen
Perceptual
http://www.vision.rwth-aachen.de/
Machine
[email protected]
Organization
• Lecturer
Prof. Bastian Leibe ([email protected])
Augmented Computing
• Assistants
Ali Athar ([email protected])
Sabarinath Mahadevan ([email protected])
• Course webpage
Winter ‘19
and Sensory
http://www.vision.rwth-aachen.de/courses/
Slides will be made available on the webpage and in moodle
Learning
• However…
Please tell me when I’m talking too fast or when I should repeat
Winter ‘19
3
B. Leibe
Organization
• Structure: 3V (lecture) + 1Ü (exercises)
6 EECS credits
Augmented Computing
• Exam
and Sensory
Written exam
Learning
4
B. Leibe
Exercises and Supplementary Material
• Exercises
Typically 1 exercise sheet every 2 weeks.
Augmented Computing
and Sensory
5
B. Leibe
Course Webpage
Augmented Computing
Winter ‘19
and Sensory
First exercise
on 24.10.
Learning
Perceptual
Machine
http://www.vision.rwth-aachen.de/courses/
6
B. Leibe
Textbooks
• The first half of the lecture is covered in Bishop’s book.
• For Deep Learning, we will use Goodfellow & Bengio.
Augmented Computing
Christopher M. Bishop
Pattern Recognition and Machine Learning
Springer, 2006
Deep Learning
MIT Press, 2016
Learning
Application papers
7
B. Leibe
How to Find Us
• Office:
UMIC Research Centre
Augmented Computing
• Office hours
Winter ‘19
and Sensory
Machine
• Already everywhere
Speech recognition (e.g. Siri)
Machine translation (e.g. Google Translate)
Winter ‘19
Robotics (everywhere)
9
B. Leibe
Slide credit: Bernt Schiele
What Is Machine Learning Useful For?
Learning
Perceptual
Machine Augmented Computing
Winter ‘19
and Sensory
10
B. Leibe
Slide adapted from Zoubin Gharamani
What Is Machine Learning Useful For?
Learning
Perceptual
Machine Augmented Computing
Winter ‘19
and Sensory
Computer Vision
(Object Recognition, Segmentation, Scene Understanding)
11
B. Leibe
Slide adapted from Zoubin Gharamani
What Is Machine Learning Useful For?
Learning
Perceptual
Machine Augmented Computing
Winter ‘19
and Sensory
Information Retrieval
(Retrieval, Categorization, Clustering, ...)
12
B. Leibe
Slide adapted from Zoubin Gharamani
What Is Machine Learning Useful For?
Learning
Perceptual
Machine Augmented Computing
Winter ‘19
and Sensory
Financial Prediction
(Time series analysis, ...)
13
B. Leibe
Slide adapted from Zoubin Gharamani
What Is Machine Learning Useful For?
Learning
Perceptual
Machine Augmented Computing
Winter ‘19
and Sensory
Medical Diagnosis
(Inference from partial observations)
14
B. Leibe Image from Kevin Murphy
Slide adapted from Zoubin Gharamani
What Is Machine Learning Useful For?
Learning
Perceptual
Machine Augmented Computing
Winter ‘19
and Sensory
Bioinformatics
(Modelling gene microarray data,...)
15
B. Leibe
Slide adapted from Zoubin Gharamani
What Is Machine Learning Useful For?
Learning
Perceptual
Machine Augmented Computing
Winter ‘19
and Sensory
Autonomous Driving
(DARPA Grand Challenge,...)
16
B. Leibe Image from Kevin Murphy
Slide adapted from Zoubin Gharamani
Machine Learning
Perceptual Winter ‘19
and Sensory Augmented Computing
B. Leibe
Deep Learning
And you might have heard of…
17
Machine Learning
• Goal
Machines that learn to perform a task from experience
Augmented Computing
• Why?
Crucial component of every intelligent/autonomous system
Important for a system’s adaptability
Winter ‘19
and Sensory
18
B. Leibe
Slide credit: Bernt Schiele
Machine Learning: Core Questions
• Learning to perform a task from experience
Augmented Computing
• Learning
Most important part here!
We do not want to encode the knowledge ourselves.
The machine should learn the relevant criteria automatically from
past observations and adapt to the given situation.
Winter ‘19
and Sensory
• Tools
Statistics
Learning
Probability theory
Decision theory
Perceptual
Machine
Information theory
Optimization theory
19
B. Leibe
Slide credit: Bernt Schiele
Machine Learning: Core Questions
• Learning to perform a task from experience
Augmented Computing
• Task
Can often be expressed through a mathematical function
𝑦 = 𝑓(𝐱; 𝐰)
𝐱: Input
Winter ‘19
𝑦: Output
and Sensory
Machine
Classification: discrete 𝑦
– E.g. class membership, sometimes also posterior probability
20
B. Leibe
Slide credit: Bernt Schiele
Example: Regression
• Automatic control of a vehicle
Augmented Computing
𝑓(𝐱; 𝐰)
𝐱 𝑦
Learning
Perceptual
Machine Winter ‘19
and Sensory
21
B. Leibe
Slide credit: Bernt Schiele
Examples: Classification
• Email filtering x [a-z] y [important, spam]
Augmented Computing
• Character recognition
Winter ‘19
and Sensory
• Speech recognition
Learning
Perceptual
Machine
22
B. Leibe
Slide credit: Bernt Schiele
Machine Learning: Core Problems
• Input x:
Augmented Computing
• Features
Invariance to irrelevant input variations
Selecting the “right” features is crucial
Winter ‘19
and Sensory
• Curse of dimensionality
Perceptual
Machine
23
B. Leibe
Slide credit: Bernt Schiele
Machine Learning: Core Questions
• Learning to perform a task from experience
Augmented Computing
• Generalization performance
and Sensory
Perceptual
Machine
24
B. Leibe
Slide credit: Bernt Schiele
Machine Learning: Core Questions
• Learning to perform a task from experience
Augmented Computing
…
and Sensory
on country roads”
Perceptual
Machine
25
B. Leibe
Slide adapted from Bernt Schiele
Machine Learning: Core Questions
• Learning to perform a task from experience
Augmented Computing
Perceptual
26
B. Leibe
Slide credit: Bernt Schiele
Machine Learning: Core Questions
• Learning to perform a task from experience
Augmented Computing
• Learning
Most often learning = optimization
Search in hypothesis space
Search for the “best” function / model parameter 𝐰
– I.e. maximize 𝑦 = 𝑓(𝐱; 𝐰) w.r.t. the performance measure
Learning
Perceptual
Machine Winter ‘19
and Sensory
27
B. Leibe
Slide credit: Bernt Schiele
Machine Learning: Core Questions
• Learning is optimization of 𝑦 = 𝑓(𝐱; 𝐰)
Augmented Computing
28
B. Leibe
Slide credit: Bernt Schiele
Course Outline
• Fundamentals
Bayes Decision Theory
Augmented Computing
• Classification Approaches
Linear Discriminants
Support Vector Machines
Ensemble Methods & Boosting
Winter ‘19
and Sensory
• Deep Learning
Foundations
Learning
29
B. Leibe
Topics of This Lecture
• Review: Probability Theory
Probabilities
Augmented Computing
Probability densities
Expectations and covariances
and Sensory
Discriminant functions
Learning
Perceptual
Machine
30
B. Leibe
Probability Theory
and Sensory
Learning Augmented Computing
Winter ‘19
to calculation.”
Machine
31
B. Leibe Image source: Wikipedia
Probability Theory
• Example: apples and oranges
We have two boxes to pick from.
Augmented Computing
• Formalization
Let B r , b be a random variable for the box we pick.
Let F a, o be a random variable for the type of fruit we get.
Winter ‘19
and Sensory
Suppose we pick the red box 40% of the time. We write this as
p( B r ) 0.4 p( B b) 0.6
Learning
Marginal probability
Machine
Conditional probability
33
B. Leibe Image source: C.M. Bishop, 2006
Probability Theory
Augmented Computing
• Rules of probability
Sum rule
Winter ‘19
and Sensory
Learning
Product rule
Perceptual
Machine
34
B. Leibe Image source: C.M. Bishop, 2006
The Rules of Probability
• Thus we have
Augmented Computing
Sum Rule
Product Rule
Winter ‘19
Bayes’ Theorem
Perceptual
Machine
where
35
B. Leibe
Probability Densities
• Probabilities over continuous
variables are defined over their
Augmented Computing
36
B. Leibe Image source: C.M. Bishop, 2006
Expectations
• The average value of some function f ( x) under a
probability distribution p( x) is called its expectation
Augmented Computing
37
B. Leibe
Variances and Covariances
• The variance provides a measure how much variability there
is in around its mean value .
Augmented Computing
38
B. Leibe
Bayes Decision Theory
Augmented Computing
Winter ‘19
and Sensory
39
B. Leibe Image source: Wikipedia
Bayes Decision Theory
• Example: handwritten character recognition
Augmented Computing
Winter ‘19
and Sensory
• Goal:
Learning
minimized.
Machine
40
B. Leibe
Slide credit: Bernt Schiele Image source: C.M. Bishop, 2006
Bayes Decision Theory
• Concept 1: Priors (a priori probabilities) p Ck
What we can tell about the probability before seeing the data.
Augmented Computing
Example:
Winter ‘19
and Sensory
C1 a p C1 0.75
C2 b p C2 0.25
Learning
Perceptual
p C 1
Machine
• In general: k
k
41
B. Leibe
Slide credit: Bernt Schiele
Bayes Decision Theory
• Concept 2: Conditional probabilities p x | Ck
Let x be a feature vector.
Augmented Computing
p x | a
Winter ‘19
and Sensory
x
p x | b
Learning
Perceptual
Machine
x
42
B. Leibe
Slide credit: Bernt Schiele
Bayes Decision Theory
• Example:
Augmented Computing
p x | a p x | b
x 15
Winter ‘19
and Sensory
• Question:
Which class?
Learning
43
B. Leibe
Slide credit: Bernt Schiele
Bayes Decision Theory
• Example:
Augmented Computing
p x | a p x | b
x 25
Winter ‘19
and Sensory
• Question:
Which class?
Learning
44
B. Leibe
Slide credit: Bernt Schiele
Bayes Decision Theory
• Example:
Augmented Computing
p x | a p x | b
x 20
Winter ‘19
and Sensory
• Question:
Which class?
Learning
• Bayes’ Theorem:
p x | Ck p Ck p x | Ck p Ck
p Ck | x
p x p x | Ci p Ci
Winter ‘19
and Sensory
• Interpretation
Learning
Likelihood Prior
Posterior
Perceptual
Normalization Factor
Machine
46
B. Leibe
Slide credit: Bernt Schiele
Bayes Decision Theory
p x | a p x | b Likelihood
Augmented Computing
x
p x | a p(a)
p x | b p(b) Likelihood £ Prior
Winter ‘19
x
and Sensory
Decision boundary
Learning
p a | x p b | x Likelihood £ Prior
Perceptual
Posterior =
NormalizationFactor
Machine
x
47
B. Leibe
Slide credit: Bernt Schiele
Bayesian Decision Theory
• Goal: Minimize the probability of a misclassification
Augmented Computing
Z Z
Machine
p(xjC1 ) p(C2 )
Learning
>
p(xjC2 ) p(C1 )
Perceptual
Machine
Decision threshold
49
B. Leibe
Slide credit: Bernt Schiele
Generalization to More Than 2 Classes
• Decide for class k whenever it has the greatest posterior
probability of all classes:
Augmented Computing
• Likelihood-ratio test
Learning
p(xjCk ) p(Cj )
> 8j 6= k
Perceptual
p(xjCj ) p(Ck )
Machine
50
B. Leibe
Slide credit: Bernt Schiele
Classifying with Loss Functions
• Generalization to decisions with a loss function
Differentiate between the possible decisions and the possible true
Augmented Computing
classes.
Example: medical diagnosis
– Decisions: sick or healthy (or: further examination necessary)
– Classes: patient is sick or healthy
51
B. Leibe
Slide credit: Bernt Schiele
Classifying with Loss Functions
• In general, we can formalize this by introducing a
loss matrix Lkj
Augmented Computing
Decision
Learning
Truth
Lcancer =
Perceptual
diagnosis
Machine
52
B. Leibe
Classifying with Loss Functions
• Loss functions may be different for different actors.
“don’t
Augmented Computing
“invest”
Example: invest”
µ ¶
¡ 12 cgain 0
Lstocktrader (subprime) =
0 0
µ ¶
Winter ‘19
¡ 12 cgain 0
and Sensory
Lbank (subprime) =
0
Learning
strategies.
Machine
53
B. Leibe
Minimizing the Expected Loss
• Optimal solution is the one that minimizes the loss.
But: loss function depends on the true class, which is unknown.
Augmented Computing
2 Decision: ®1, ®2
Loss function: L(®j jCk ) = Lkj
Expected loss (= risk R) for the two decisions:
Winter ‘19
and Sensory
I.e. decide ®1 if
Perceptual
Machine
55
B. Leibe
Slide credit: Bernt Schiele
Minimizing the Expected Loss
R(®2 jx) > R(®1 jx)
L12 p(C1 jx) + L22 p(C2 jx) > L11 p(C1 jx) + L21 p(C2 jx)
Augmented Computing
>
p(xjC2 ) (L12 ¡ L11 ) p(C1 )
Learning
56
B. Leibe
Slide credit: Bernt Schiele
The Reject Option
Augmented Computing
Winter ‘19
and Sensory
These are the regions where we are relatively uncertain about class
Perceptual
membership.
Machine
y1(x); : : : ; yK (x)
Classify x as class Ck if
yk (x) > yj (x) 8j 6= k
• Examples (Bayes Decision Theory)
Winter ‘19
and Sensory
58
B. Leibe
Slide credit: Bernt Schiele
Different Views on the Decision Problem
• yk (x) / p(xjCk )p(Ck )
First determine the class-conditional densities for each class
Augmented Computing
Generative methods
probabilities.
and Sensory
Discriminative methods
Learning
• Alternative
Perceptual
Machine
3
– Histograms
N = 10
2
– k-Nearest Neighbor 1
Parametric methods
– Gaussian distribution
– Mixtures of Gaussians
Winter ‘19
and Sensory
• Discriminant functions
Learning
Linear discriminants
Support vector machines
Perceptual
Machine
Next lectures…
60
B. Leibe
References and Further Reading
• More information, including a short review of Probability
theory and a good introduction in Bayes Decision Theory
Augmented Computing
Christopher M. Bishop
Pattern Recognition and Machine Learning
Springer, 2006
Learning
Perceptual
Machine Winter ‘19
and Sensory
61
B. Leibe