Professional Documents
Culture Documents
A
N (µA , σA2 ) > P(B)
(2)
N (µB , σB2 ) < P(A)
B
h i A
exp − 12 ( x−µ
σA
A 2
) > σA P(B)
h i (3)
exp − 12 ( σB B )2 < σB P(A)
x−µ
B
In log-likelihood form:
h i A
exp − 21 ( x−µ
σA
A 2
) > σA P(B)
h i (4)
exp − 21 ( x−µ A 2 < σB P(A)
σA )
B
A
1 x − µA 2 1 x − µB 2 >
− ( ) − − ( ) ln [σA P(B)] − ln [σB P(A)]
2 σA 2 σB <
B
(5)
A
x − µB 2 x − µA 2 >
( ) − ( ) 2 [ln [σA P(B)] − ln [σB P(A)]] (6)
σB σA <
B
Alexander Wong SYDE 372
MAP Classifier for Normal Distributions
Performance of the Bayes Classifier
Error bounds
A
x − µB 2 x − µA 2 >
( ) − ( ) 2 [ln [σA P(B)] − ln [σB P(A)]]
σB σA <
B
(7)
Does this look familiar?
(µ2B − µ2A )
x= (13)
2(µB − µA )
Alexander Wong SYDE 372
MAP Classifier for Normal Distributions
Performance of the Bayes Classifier
Error bounds
(µB − µA )(µB + µA )
x= (14)
2(µB − µA )
(µB + µA )
x= (15)
2
Therefore, for the case of equally likely, equi-variance
classes, the MAP rule reduces to a threshold midway
between the means.
Plugging in µA , µB , and σA = σB = σ:
A
exp − 12 ( x−130 2
20 ) > P(B)
1 x−150 (20)
exp − 2 ( 20 ) < P(A)
2
B
A
h i h i >
(x − 150)2 − (x − 130)2 800 [ln [0.6/0.4]] (24)
<
B
A
h i h i >
(x − 150)2 − (x − 130)2 800 [ln [1.5]] (25)
<
B
Alexander Wong SYDE 372
MAP Classifier for Normal Distributions
Performance of the Bayes Classifier
Error bounds
A " #
|Σ | 1/2 P(B)
> A
(x−µB )T Σ−1 T −1
B (x−µB )−(x−µA ) ΣA (x−µA ) < 2 ln
|ΣB |1/2 P(A)
B
(34)
A
T −1 T −1 > P(B) |ΣA |
(x−µB ) ΣB (x−µB )−(x−µA ) ΣA (x−µA ) 2 ln +ln
< P(A) |ΣB |
B
(35)
Looks familiar?
x T Q0 x + Q1 x + Q2 + 2Q3 + Q4 = 0, (36)
where,
Q0 = SA−1 − SB−1 (37)
Q1 = 2[mTB SB−1 − mTA SA−1 ] (38)
Q2 = mTA SA−1 mA − mTB SB−1 mB (39)
P(B)
Q3 = ln (40)
P(A)
|SA |
Q4 = ln (41)
|SB |
Alexander Wong SYDE 372
MAP Classifier for Normal Distributions
Performance of the Bayes Classifier
Error bounds
Step 2: Compute Q0 , Q1 , Q2 , Q3 :
−1 −1 1/4 0 1 0 −3/4 0
Q0 = SA −SB = − =
0 1/4 0 1 0 −3/4
(43)
Q1 = 2[mTB SB−1 − mTA SA−1 ] = 0 (44)
Q2 = mTA SA−1 mA − mTB SB−1 mB = 0 (45)
Step 2: Compute Q0 , Q1 , Q2 , Q3 :
P(B) 0.4
Q3 = ln = ln = ln(4/6) (46)
P(A) 0.6
|SA | (4)(4) − (0)(0)
Q4 = ln = ln = ln(16). (47)
|SB | (1)(1) − (0)(0)
Step 3: Plugging in Q0 , Q1 , Q2 , Q3 gives us:
x T Q0 x + Q1 x + Q2 + 2Q3 + Q4 = 0, (48)
T −3/4 0
x x + 2 ln(4/6) + ln(16) = 0, (49)
0 −3/4
You will notice that the terms on the right has the same
form as the MICD distance metric!
A
> P(B) |ΣA |
(x−µB ) T
Σ−1 T −1
B (x−µB )−(x−µA ) ΣA (x−µA ) 2 ln +ln
< P(A) |ΣB |
B
(54)
A
2 2 > P(B) |ΣA |
dMICD (x, µB , ΣB ) − dMICD (x, µA , ΣA ) 2 ln + ln
< P(A) |ΣB |
B
h i h i (55)
|ΣA |
If 2 ln P(B)
P(A) + ln |ΣB | = 0, then the MAP classifier
becomes just the MICD classifier!
Alexander Wong SYDE 372
MAP Classifier for Normal Distributions
Performance of the Bayes Classifier
Error bounds
If P(A) = P(B)
" #
s2
(1/sB2 − 1/sA2 )x 2 > ln A2 (60)
sB
P(x|A)P(A)
P(|x)|x=140 = P(A|x)|x=140 = |x=140
P(x|A)P(A) + P(x|B)P(B)
(68)
26/1477(0.4)
P(|x)|x=140 = (69)
(26/1477)0.4 + (26/1477)(0.6)
P(|x)|x=140 = 0.4. (70)
(µB +µA )
Z Z ∞
1 2 1
P() = P(x|B)dx + P(x|A)dx (79)
2 −∞ 2 (µB +µA )
2
(µB +µA )
Z Z ∞
1 2
2 1
P() = N (µB , σ )dx + N (µA , σ 2 )dx
2 −∞ 2 (µB +µA )
2
(80)
Z ∞
1 1 2
P() = (µ −µ ) √ exp − y dy (84)
B A 2π 2
2σ
Visualization of P():
Observations:
As the distance between the means increase, the shaded
area becomes monotonically smaller and the expected
probability of error P() monotonically decreases.
At α = 0, µA = µB = 0 and P() = 1/2 (makes sense since
the distributions completely overlap, and you have a 50/50
chance of either class)
limα→∞ P() = 0.
Example:
ce−λx 0 ≤ x ≤ 1
p(x|C1 ) = (89)
0 else
ce−λ(1−x) 0 ≤ x ≤ 1
p(x|C2 ) = (90)
0 else
1
P(C1 ) = P(C2 ) = (91)
2
where c = 1−eλ−λ is just the appropriate constant to
normalize the PDF.
P(x|C2 )P(C2 )
(
P(x) 0 ≤ x ≤ 1/2
p(|x) = P(x|C1 )P(C1 ) (98)
P(x) 1/2 ≤ x ≤ 1
e−λx 0.5
(
e−λx +e−λ(1−x)
0 ≤ x ≤ 1/2
p(|x) = e−λ(1−x) 0.5
(99)
e−λx +e−λ(1−x)
1/2 ≤ x ≤ 1
Error bounds
Bhattacharrya bound
p Z p
P() ≤ P(A)P(B) P(x|A)P(x|B)dx (102)
Bhattacharrya bound
√
P() ≤ 0.8 × 0.2 × ρ (109)
√
P() ≤ 0.8 × 0.2 × 0.6 = 0.24 (110)