Professional Documents
Culture Documents
Guido Sanguinetti
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Overview
Today’s lecture
Gaussians
The multidimensional Gaussian distribution
Bayes theorem and probability density functions
The Gaussian classifier
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
(One-dimensional) Gaussian distribution
One-dimensional Gaussian with zero mean and unit variance
(µ = 0, σ 2 = 1):
pdf of Gaussian Distribution
0.4
mean=0
variance=1
0.35
0.3
0.25
p(x|m,s)
0.2
0.15
0.1
0.05
0
−4 −3 −2 −1 0 1 2 3 4
x
−(x − µ)2
2 2 1
p(x|µ, σ ) = N(x; µ, σ ) = √ exp
2πσ 2 2σ 2
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
The multidimensional Gaussian distribution
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
The multidimensional Gaussian distribution
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
The multidimensional Gaussian distribution
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Covariance matrix
The mean vector µ is the expectation of x:
µ = E [x]
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Covariance matrix
The mean vector µ is the expectation of x:
µ = E [x]
The covariance matrix Σ is the expectation of the deviation of
x from the mean:
Σ = E [(x − µ)(x − µ)T ]
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Covariance matrix
The mean vector µ is the expectation of x:
µ = E [x]
The covariance matrix Σ is the expectation of the deviation of
x from the mean:
Σ = E [(x − µ)(x − µ)T ]
Σ is a d × d symmetric matrix:
Σij = E [(xi − µi )(xj − µj )] = E [(xj − µj )(xi − µi )] = Σji
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Covariance matrix
The mean vector µ is the expectation of x:
µ = E [x]
The covariance matrix Σ is the expectation of the deviation of
x from the mean:
Σ = E [(x − µ)(x − µ)T ]
Σ is a d × d symmetric matrix:
Σij = E [(xi − µi )(xj − µj )] = E [(xj − µj )(xi − µi )] = Σji
The sign of the covariance helps to determine the relationship
between two components:
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Covariance matrix
The mean vector µ is the expectation of x:
µ = E [x]
The covariance matrix Σ is the expectation of the deviation of
x from the mean:
Σ = E [(x − µ)(x − µ)T ]
Σ is a d × d symmetric matrix:
Σij = E [(xi − µi )(xj − µj )] = E [(xj − µj )(xi − µi )] = Σji
The sign of the covariance helps to determine the relationship
between two components:
If xj is large when xi is large, then (xj − µj )(xi − µi ) will tend
to be positive;
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Covariance matrix
The mean vector µ is the expectation of x:
µ = E [x]
The covariance matrix Σ is the expectation of the deviation of
x from the mean:
Σ = E [(x − µ)(x − µ)T ]
Σ is a d × d symmetric matrix:
Σij = E [(xi − µi )(xj − µj )] = E [(xj − µj )(xi − µi )] = Σji
The sign of the covariance helps to determine the relationship
between two components:
If xj is large when xi is large, then (xj − µj )(xi − µi ) will tend
to be positive;
If xj is small when xi is large, then (xj − µj )(xi − µi ) will tend
to be negative.
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Correlation matrix
The covariance matrix is not scale-independent: Define the
correlation coefficient:
Sjk
ρ(xj , xk ) = ρjk = p
Sjj Skk
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Correlation matrix
The covariance matrix is not scale-independent: Define the
correlation coefficient:
Sjk
ρ(xj , xk ) = ρjk = p
Sjj Skk
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Correlation matrix
The covariance matrix is not scale-independent: Define the
correlation coefficient:
Sjk
ρ(xj , xk ) = ρjk = p
Sjj Skk
ρ(x, y ) = +1 if y = ax + b a>0
ρ(x, y ) = −1 if y = ax + b a<0
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Spherical Gaussian
1.5
0.16
1
0.14
0.12 0.5
0.1
p(x1, x2)
0.08 0
x2
0.06
0.04 −0.5
0.02
0 −1
2
1 2
1.5 −1.5
1
0 0.5
0
−1 −0.5
−1 −2
−1.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2
x2 −2 −2
x1 x1
0 1 0
µ= Σ= ρ12 = 0
0 0 1
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Diagonal Covariance Gaussian
0.08 2
0.07
0.06 1
0.05
p(x1, x2)
x2
0.04
0.03
−1
0.02
0.01 −2
0
4 4
2 2 −3
0 0
−2 −2
−4
−4 −4 −4 −3 −2 −1 0 1 2 3 4
x2 x1 x1
0 1 0
µ= Σ= ρ12 = 0
0 0 4
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Full covariance Gaussian
0.1
2
0.08
1
0.06
p(x1, x2)
x2
0.04
−1
0.02
0 −2
4
2 4
3 −3
2
0 1
0
−2 −1
−2 −4
−3 −4 −3 −2 −1 0 1 2 3 4
x2 −4 −4
x1 x1
0 1 −1
µ= Σ= ρ12 = −0.5
0 −1 4
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Parameter estimation
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Example data
10
5
X2
−5
−4 −2 0 2 4 6 8 10
X1
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Maximum likelihood fit to a Gaussian
10
5
X2
−5
−4 −2 0 2 4 6 8 10
X1
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Bayes theorem and probability densities
Rules for probability densities are similar to those for
probabilities:
p(x, y ) = p(x|y )p(y )
Z
p(x) = p(x, y )dy
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Bayes theorem and probability densities
Rules for probability densities are similar to those for
probabilities:
p(x, y ) = p(x|y )p(y )
Z
p(x) = p(x, y )dy
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Bayes theorem and probability densities
Rules for probability densities are similar to those for
probabilities:
p(x, y ) = p(x|y )p(y )
Z
p(x) = p(x, y )dy
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Bayes theorem and univariate Gaussians
If p(x | C ) is Gaussian with mean µc and variance σc2 :
P(C | x) ∝ p(x | C )P(C )
∝ N(x; µc , σc2 )P(C )
−(x − µc )2
1
∝p exp P(C )
2πσc2 2σc2
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Bayes theorem and univariate Gaussians
If p(x | C ) is Gaussian with mean µc and variance σc2 :
P(C | x) ∝ p(x | C )P(C )
∝ N(x; µc , σc2 )P(C )
−(x − µc )2
1
∝p exp P(C )
2πσc2 2σc2
Taking logs, we have the log likelihood LL(x | C ):
LL(x | C ) = ln p(x | µc , σc2 )
(x − µc )2
1 2
= − ln(2π) − ln σc −
2 σc2
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Bayes theorem and univariate Gaussians
If p(x | C ) is Gaussian with mean µc and variance σc2 :
P(C | x) ∝ p(x | C )P(C )
∝ N(x; µc , σc2 )P(C )
−(x − µc )2
1
∝p exp P(C )
2πσc2 2σc2
Taking logs, we have the log likelihood LL(x | C ):
LL(x | C ) = ln p(x | µc , σc2 )
(x − µc )2
1 2
= − ln(2π) − ln σc −
2 σc2
The log posterior probability LP(C | x) is:
LP(C | x) ∝ LL(x | C ) + LP(C )
(x − µc )2
1 2
∝ − ln(2π) − ln σc − + ln P(C )
2 σc2
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Example: 1-dimensional Gaussian classifier
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Example: 1-dimensional Gaussian classifier
µ(S) = 10 σ 2 (S) = 1
µ(T ) = 12 σ 2 (T ) = 4
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Gaussian pdfs for S and T
0.4
0.35 P(x|S)
0.3
0.25
p(x)
0.2
0.15
P(x(T)
0.1
0.05
0
0 5 10 15 20 25
x
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Example: 1-dimensional Gaussian classifier
µ(S) = 10 σ 2 (S) = 1
µ(T ) = 12 σ 2 (T ) = 4
x 1 = 10 x 2 = 11 x3 = 6
(x − µS )2 (x − µT )2
P(S|X = x) 1
ln =− − + ln σS2 − ln σT2
P(T |X = x) 2 σS2 σT2
+ ln P(S) − ln P(T )
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Log odds
(x − µS )2 (x − µT )2
P(S|X = x) 1
ln =− − + ln σS2 − ln σT2
P(T |X = x) 2 σS2 σT2
+ ln P(S) − ln P(T )
1 (x − µS )2 (x − µT )2
P(S|X = x) 2 2
ln =− − + ln σ S − ln σ T
P(T |X = x) 2 σS2 σT2
(x − 12)2
1
=− (x − 10)2 − − ln 4
2 4
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Log odds
(x − µS )2 (x − µT )2
P(S|X = x) 1
ln =− − + ln σS2 − ln σT2
P(T |X = x) 2 σS2 σT2
+ ln P(S) − ln P(T )
1 (x − µS )2 (x − µT )2
P(S|X = x) 2 2
ln =− − + ln σ S − ln σ T
P(T |X = x) 2 σS2 σT2
(x − 12)2
1
=− (x − 10)2 − − ln 4
2 4
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Log odds
2
−2
ln P(S|x)/P(T|x)
−4
−6
−8
−10
−12
5 6 7 8 9 10 11 12 13 14 15
x
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Example: unequal priors
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Example: unequal priors
(x − µS )2 (x − µT )2
P(S|X = x) 1
ln =− − + ln σS2 − ln σT2
P(T |X = x) 2 σS2 σT2
+ ln P(S) − ln P(T )
(x − 12)2
1
=− (x − 10)2 − − ln 4 + ln P(S) − ln P(T )
2 4
(x − 12)2
1 2
=− (x − 10) − − ln 4 + ln(3/7)
2 4
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Log odds
2
P(S)=0.5
P(S)=0.3
0
−2
ln P(S|x)/P(T|x)
−4
−6
−8
−10
−12
5 6 7 8 9 10 11 12 13 14 15
x
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Multivariate Gaussian classifier
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Multivariate Gaussian classifier
Log likelihood:
d 1 1
LL(x|µ, Σ) = − ln(2π) − ln |Σ| − (x − µ)T Σ−1 (x − µ)
2 2 2
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Multivariate Gaussian classifier
Log likelihood:
d 1 1
LL(x|µ, Σ) = − ln(2π) − ln |Σ| − (x − µ)T Σ−1 (x − µ)
2 2 2
If p(x | C ) ∼ p(x | µ, Σ), the log posterior probability is:
1 1
ln P(C |x) ∝ − (x − µ)T Σ−1 (x − µ) − ln |Σ| + ln P(C )
2 2
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Example
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Example
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Example
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Example
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Training data
4
−2
−4
−6
−8
−8 −6 −4 −2 0 2 4 6
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Gaussians estimated from training data
4
−2
−4
−6
−8
−8 −6 −4 −2 0 2 4 6
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Testing data
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Testing data — with estimated class distributions
4
−2
−4
−6
−8
−8 −6 −4 −2 0 2 4 6
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Testing data — with true classes indicated
4
−2
−4
−6
−8
−8 −6 −4 −2 0 2 4 6
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Classifying test data from class A
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Classifying test data from class B
4
−2
−4
−6
−8
−8 −6 −4 −2 0 2 4 6
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Classifying test data from class C
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Results
Analyze results by percent correct, and in more detail with a
confusion matrix
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Results
Analyze results by percent correct, and in more detail with a
confusion matrix
Rows of a confusion matrix correspond to the predicted classes
(classifier outputs)
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Results
Analyze results by percent correct, and in more detail with a
confusion matrix
Rows of a confusion matrix correspond to the predicted classes
(classifier outputs)
Columns correspond to the true class labels
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Results
Analyze results by percent correct, and in more detail with a
confusion matrix
Rows of a confusion matrix correspond to the predicted classes
(classifier outputs)
Columns correspond to the true class labels
Element (r , c) is the number of patterns from true class c that
were classified as class r
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Results
Analyze results by percent correct, and in more detail with a
confusion matrix
Rows of a confusion matrix correspond to the predicted classes
(classifier outputs)
Columns correspond to the true class labels
Element (r , c) is the number of patterns from true class c that
were classified as class r
Total number of correctly classified patterns is obtained by
summing the numbers on the leading diagonal
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Results
Analyze results by percent correct, and in more detail with a
confusion matrix
Rows of a confusion matrix correspond to the predicted classes
(classifier outputs)
Columns correspond to the true class labels
Element (r , c) is the number of patterns from true class c that
were classified as class r
Total number of correctly classified patterns is obtained by
summing the numbers on the leading diagonal
Confusion matrix in this case:
True class
Test Data A B C
Predicted A 77 5 9
class B 15 88 2
C 8 7 89
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Results
Analyze results by percent correct, and in more detail with a
confusion matrix
Rows of a confusion matrix correspond to the predicted classes
(classifier outputs)
Columns correspond to the true class labels
Element (r , c) is the number of patterns from true class c that
were classified as class r
Total number of correctly classified patterns is obtained by
summing the numbers on the leading diagonal
Confusion matrix in this case:
True class
Test Data A B C
Predicted A 77 5 9
class B 15 88 2
C 8 7 89
Overall proportion of test patterns correctly classified is
(77 + 88 + 89)/300 = 254/300 = 0.85.
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Decision Regions
0
x2
−2
−4
−6
−8
−8 −6 −4 −2 0 2 4 6 8
x1
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Example: Classifying spoken vowels
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
The data
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Vowel data — 10 classes
Peterson−Barney F1−F2 Vowel Training Data
3500
IY
IH
EH
AE
AH
3000 AA
AO
UH
UW
ER
2500
F2 / Hz
2000
1500
1000
500
0 200 400 600 800 1000 1200
F1 / Hz
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Gaussian for class 1 (IY)
3500
3000
2500
2000
1500
1000
500
0 200 400 600 800 1000 1200
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Gaussian for class 2 (IH)
Peterson−Barney F1−F2 Vowel Training Data
3500
IY
IH
EH
AE
AH
3000 AA
AO
UH
UW
ER
2500
F2 / Hz
2000
1500
1000
500
0 200 400 600 800 1000 1200
F1 / Hz
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Gaussian for class 3 (EH)
Peterson−Barney F1−F2 Vowel Training Data
3500
3000
2500
F2 / Hz
2000
1500
1000
500
0 200 400 600 800 1000 1200
F1 / Hz
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Gaussian for class 4 (AE)
Peterson−Barney F1−F2 Vowel Training Data
3500
IY
IH
EH
AE
AH
3000 AA
AO
UH
UW
ER
2500
F2 / Hz
2000
1500
1000
500
0 200 400 600 800 1000 1200
F1 / Hz
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Gaussian for class 5 (AH)
Peterson−Barney F1−F2 Vowel Training Data
3500
IY
IH
EH
AE
AH
3000 AA
AO
UH
UW
ER
2500
F2 / Hz
2000
1500
1000
500
0 200 400 600 800 1000 1200
F1 / Hz
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Gaussian for class 6 (AA)
Peterson−Barney F1−F2 Vowel Training Data
3500
IY
IH
EH
AE
AH
3000 AA
AO
UH
UW
ER
2500
F2 / Hz
2000
1500
1000
500
0 200 400 600 800 1000 1200
F1 / Hz
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Gaussian for class 7 (AO)
Peterson−Barney F1−F2 Vowel Training Data
3500
IY
IH
EH
AE
AH
3000 AA
AO
UH
UW
ER
2500
F2 / Hz
2000
1500
1000
500
0 200 400 600 800 1000 1200
F1 / Hz
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Gaussian for class 8 (UH)
Peterson−Barney F1−F2 Vowel Training Data
3500
IY
IH
EH
AE
AH
3000 AA
AO
UH
UW
ER
2500
F2 / Hz
2000
1500
1000
500
0 200 400 600 800 1000 1200
F1 / Hz
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Gaussian for class 9 (UW)
Peterson−Barney F1−F2 Vowel Training Data
3500
IY
IH
EH
AE
AH
3000 AA
AO
UH
UW
ER
2500
F2 / Hz
2000
1500
1000
500
0 200 400 600 800 1000 1200
F1 / Hz
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Gaussian for class 10 (ER)
3500
3000
2500
2000
1500
1000
500
0 200 400 600 800 1000 1200
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Gaussians for each class
Peterson−Barney F1−F2 Vowel Test Data
3500
3000
2500
F2 / Hz
2000
1500
1000
500
0 200 400 600 800 1000 1200
F1 / Hz
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Test data for class 1 (IY)
Peterson−Barney F1−F2 Vowel Test Data
3500
3000
2500
F2 / Hz
2000
1500
1000
500
0 200 400 600 800 1000 1200
F1 / Hz
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Confusion matrix
True class
IY
IY 20
IH 0
EH 0
AE 0
AH 0
AA 0
AO 0
UH 0
UW 0
ER 0
% corr. 100
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Test data for class 2 (IH)
Peterson−Barney F1−F2 Vowel Test Data
3500
3000
2500
F2 / Hz
2000
1500
1000
500
0 200 400 600 800 1000 1200
F1 / Hz
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Confusion matrix
True class
IY IH
IY 20 0
IH 0 20
EH 0 0
AE 0 0
AH 0 0
AA 0 0
AO 0 0
UH 0 0
UW 0 0
ER 0 0
% corr. 100 100
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Test data for class 3 (EH)
Peterson−Barney F1−F2 Vowel Test Data
3500
3000
2500
F2 / Hz
2000
1500
1000
500
0 200 400 600 800 1000 1200
F1 / Hz
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Confusion matrix
True class
IY IH EH
IY 20 0 0
IH 0 20 0
EH 0 0 15
AE 0 0 1
AH 0 0 0
AA 0 0 0
AO 0 0 0
UH 0 0 0
UW 0 0 0
ER 0 0 4
% corr. 100 100 75
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Test data for class 4 (AE)
Peterson−Barney F1−F2 Vowel Test Data
3500
3000
2500
F2 / Hz
2000
1500
1000
500
0 200 400 600 800 1000 1200
F1 / Hz
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Confusion matrix
True class
IY IH EH AE
IY 20 0 0 0
IH 0 20 0 0
EH 0 0 15 3
AE 0 0 1 16
AH 0 0 0 1
AA 0 0 0 0
AO 0 0 0 0
UH 0 0 0 0
UW 0 0 0 0
ER 0 0 4 0
% corr. 100 100 75 80
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Test data for class 5 (AH)
Peterson−Barney F1−F2 Vowel Test Data
3500
3000
2500
F2 / Hz
2000
1500
1000
500
0 200 400 600 800 1000 1200
F1 / Hz
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Confusion matrix
True class
IY IH EH AE AH
IY 20 0 0 0 0
IH 0 20 0 0 0
EH 0 0 15 3 0
AE 0 0 1 16 0
AH 0 0 0 1 18
AA 0 0 0 0 2
AO 0 0 0 0 0
UH 0 0 0 0 0
UW 0 0 0 0 0
ER 0 0 4 0 0
% corr. 100 100 75 80 90
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Test data for class 6 (AA)
Peterson−Barney F1−F2 Vowel Test Data
3500
3000
2500
F2 / Hz
2000
1500
1000
500
0 200 400 600 800 1000 1200
F1 / Hz
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Confusion matrix
True class
IY IH EH AE AH AA
IY 20 0 0 0 0 0
IH 0 20 0 0 0 0
EH 0 0 15 3 0 0
AE 0 0 1 16 0 0
AH 0 0 0 1 18 2
AA 0 0 0 0 2 17
AO 0 0 0 0 0 1
UH 0 0 0 0 0 0
UW 0 0 0 0 0 0
ER 0 0 4 0 0 0
% corr. 100 100 75 80 90 85
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Test data for class 7 (AO)
Peterson−Barney F1−F2 Vowel Test Data
3500
3000
2500
F2 / Hz
2000
1500
1000
500
0 200 400 600 800 1000 1200
F1 / Hz
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Confusion matrix
True class
IY IH EH AE AH AA AO
IY 20 0 0 0 0 0 0
IH 0 20 0 0 0 0 0
EH 0 0 15 3 0 0 0
AE 0 0 1 16 0 0 0
AH 0 0 0 1 18 2 0
AA 0 0 0 0 2 17 4
AO 0 0 0 0 0 1 16
UH 0 0 0 0 0 0 0
UW 0 0 0 0 0 0 0
ER 0 0 4 0 0 0 0
% corr. 100 100 75 80 90 85 80
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Test data for class 8 (UH)
Peterson−Barney F1−F2 Vowel Test Data
3500
3000
2500
F2 / Hz
2000
1500
1000
500
0 200 400 600 800 1000 1200
F1 / Hz
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Confusion matrix
True class
IY IH EH AE AH AA AO UH
IY 20 0 0 0 0 0 0 0
IH 0 20 0 0 0 0 0 0
EH 0 0 15 3 0 0 0 0
AE 0 0 1 16 0 0 0 0
AH 0 0 0 1 18 2 0 2
AA 0 0 0 0 2 17 4 0
AO 0 0 0 0 0 1 16 0
UH 0 0 0 0 0 0 0 18
UW 0 0 0 0 0 0 0 0
ER 0 0 4 0 0 0 0 0
% corr. 100 100 75 80 90 85 80 90
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Test data for class 9 (UW)
Peterson−Barney F1−F2 Vowel Test Data
3500
3000
2500
F2 / Hz
2000
1500
1000
500
0 200 400 600 800 1000 1200
F1 / Hz
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Confusion matrix
True class
IY IH EH AE AH AA AO UH UW
IY 20 0 0 0 0 0 0 0 0
IH 0 20 0 0 0 0 0 0 0
EH 0 0 15 3 0 0 0 0 0
AE 0 0 1 16 0 0 0 0 0
AH 0 0 0 1 18 2 0 2 0
AA 0 0 0 0 2 17 4 0 0
AO 0 0 0 0 0 1 16 0 0
UH 0 0 0 0 0 0 0 18 5
UW 0 0 0 0 0 0 0 0 15
ER 0 0 4 0 0 0 0 0 0
% corr. 100 100 75 80 90 85 80 90 75
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Test data for class 10 (ER)
Peterson−Barney F1−F2 Vowel Test Data
3500
3000
2500
F2 / Hz
2000
1500
1000
500
0 200 400 600 800 1000 1200
F1 / Hz
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Final confusion matrix
True class
IY IH EH AE AH AA AO UH UW ER
IY 20 0 0 0 0 0 0 0 0 0
IH 0 20 0 0 0 0 0 0 0 0
EH 0 0 15 3 0 0 0 0 0 0
AE 0 0 1 16 0 0 0 0 0 0
AH 0 0 0 1 18 2 0 2 0 0
AA 0 0 0 0 2 17 4 0 0 0
AO 0 0 0 0 0 1 16 0 0 0
UH 0 0 0 0 0 0 0 18 5 2
UW 0 0 0 0 0 0 0 0 15 0
ER 0 0 4 0 0 0 0 0 0 18
% corr. 100 100 75 80 90 85 80 90 75 90
Total: 86.5% correct
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Classifying the training set
3500
3000
2500
2000
1500
1000
500
0 200 400 600 800 1000 1200
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Training set confusion matrix
True class
IY IH EH AE AH AA AO UH UW ER
IY 99 8 0 0 0 0 0 0 0 0
IH 3 85 15 0 0 0 0 0 0 3
EH 0 7 69 11 0 0 0 0 0 11
AE 0 0 5 86 4 0 0 0 0 4
AH 0 0 0 3 87 8 3 2 0 1
AA 0 0 0 0 4 82 10 0 0 0
AO 0 0 0 0 5 12 86 2 0 0
UH 0 0 0 0 0 0 2 73 19 10
UW 0 0 0 0 0 0 1 15 79 1
ER 0 2 13 2 2 0 0 10 4 72
% 97.1 83.3 67.6 84.3 85.3 80.4 84.3 71.6 77.5 70.6
Total: 80.2% correct
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Decision Regions
Peterson−Barney F1−F2 Gaussian Decision Regions
3500
3000
2500
F2 / Hz
2000
1500
1000
500
0 200 400 600 800 1000 1200
F1 / Hz
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G
Summary
Informatics 2B: Learning and Data Lecture 9 Multidimensional Gaussian distribution and classification with G