Decision Making Probabilistic model Known Unknown Bayes Decision - - PowerPoint PPT Presentation

decision making
SMART_READER_LITE
LIVE PREVIEW

Decision Making Probabilistic model Known Unknown Bayes Decision - - PowerPoint PPT Presentation

Bayesian Decision Theory Chapter 2 (Jan 11, 18, 23, 25) Bayes decision theory is a fundamental statistical approach to pattern classification Assumption: decision problem posed in probabilistic terms and relevant probability values are


slide-1
SLIDE 1

Bayesian Decision Theory Chapter 2

(Jan 11, 18, 23, 25)

  • Bayes decision theory is a fundamental

statistical approach to pattern classification

  • Assumption: decision problem posed in

probabilistic terms and relevant probability values are known

slide-2
SLIDE 2
slide-3
SLIDE 3
slide-4
SLIDE 4

Decision Making

Probabilistic model Known Unknown Supervised Learning Unsupervised Learning Nonparametric Approach (Chapter 4, 6) Parametric Approach (Chapter 3) Nonparametric Approach (Chapter 10) Parametric Approach (Chapter 10) Bayes Decision Theory (Chapter 2) “Optimal” Rules Plug-in Rules Density Estimation K-NN, neural networks Mixture models Cluster Analysis

slide-5
SLIDE 5

Sea bass v. Salmon Classification

  • Each fish appearing on the conveyor belt is either

sea bass or salmon; two “states of nature”

  • Let  denote the state of nature: 1 = sea bass

and 2 = salmon;  is a random variable that must be described probabilistically

  • a priori (prior) probability: P (1) and P(2); P (1)

is the probability next fish observed is a sea bass

  • If no other types of fish are present then
  • P(1) + P( 2) = 1 (exclusivity and exhaustivity)
  • P(1) = P(2)

(uniform priors)

  • Prior prob. reflects our prior knowledge about how likely

we are to observe a sea bass or salmon; prior prob. may depend on time of the year or the fishing area!

slide-6
SLIDE 6
  • Case 1: Suppose we are asked to make a decision

without observing the fish. We only have prior information

  • Bayes decision rule given only prior information
  • Decide 1 if P(1) > P(2), otherwise decide 2
  • Error rate = Min {P(1) , P(2)}
  • Suppose now we are allowed to measure a feature
  • n the state of nature - say the fish lightness value
  • Define class-conditional probability density function

(pdf) of feature x; x is a r.v.

  • P(x | i) is the prob. of x given class i , i =1, 2. P(x |

i )>= 0 and area under the pdf is 1.

slide-7
SLIDE 7

Less the densities overlap, better the feature

slide-8
SLIDE 8
  • Case 2: Suppose we only have class-conditional

densities and no prior information

  • Maximum likelihood decision rule
  • Assign input pattern x to class 1 if

P(x | 1) > P(x | 2), otherwise 2

  • P(x | 1) is also the likelihood of class 1 given the

feature value x

  • Case 3: We have both prior densities and class-

conditional densities

  • How does the feature x influence our attitude

(prior) concerning the true state of nature?

  • Bayes decision rule
slide-9
SLIDE 9
  • Posteriori prob. is a function of likelihood & prior
  • Joint density: P(j , x) = P(j | x)p (x) = p(x | j) P (j)
  • Bayes rule

P(j | x) = {p(x | j) . P (j)} / p(x), j = 1,2 where

  • Posterior = (Likelihood x Prior) / Evidence
  • Evidence P(x) can be viewed as a scale factor that

guarantees that the posterior probabilities sum to 1

  • P(x) is also called the unconditional density of feature x

 

2 1

) ( ) | ( ) (

j j j j P

x P x P  

slide-10
SLIDE 10
slide-11
SLIDE 11
  • P(1 | x) is the probability of the state of nature being 1

given that feature value x has been observed

  • Decision based on the posterior probabilities is called the

“Optimal” Bayes Decision rule. What does optimal mean? For a given observation (feature value) X: if P(1 | x) > P(2 | x) decide 1 if P(1 | x) < P(2 | x) decide 2 To justify the above rule, calculate the probability of error: P(error | x) = P(1 | x) if we decide 2 P(error | x) = P(2 | x) if we decide 1

slide-12
SLIDE 12
  • So, for a given x, we can minimize the prob. of

error by deciding 1 if P(1 | x) > P(2 | x);

  • therwise decide 2

Therefore: P(error | x) = min [P(1 | x), P(2 | x)]

  • For each observation x, Bayes decision rule

minimizes the probability of error

  • Unconditional error: P(error) obtained by

integration over all possible observed x w.r.t. p(x)

slide-13
SLIDE 13
  • Optimal Bayes decision rule

Decide 1 if P(1 | x) > P(2 | x); otherwise decide 2

  • Special cases:

(i) P(1) = P(2); Decide 1 if p(x | 1) > p(x | 2), otherwise 2 (ii) p(x | 1) = p(x | 2); Decide 1 if P(1) > P(2), otherwise 2

slide-14
SLIDE 14

Bayesian Decision Theory – Continuous Features

  • Generalization of the preceding formulation
  • Use of more than one feature (d features)
  • Use of more than two states of nature (c classes)
  • Allowing actions other than deciding on the state of

nature

  • Introduce a “loss function”; minimizing the “risk” is more

general than minimizing the probability of error

slide-15
SLIDE 15
  • Allowing actions other than classification primarily

allows the possibility of “rejection”

  • Rejection: Input pattern is rejected when it is

difficult to decide between two classes or the pattern is too noisy!

  • The loss function specifies the cost of each action
slide-16
SLIDE 16
  • Let {1, 2,…, c} be the set of c states of nature

(or “categories” or “classes”)

  • Let {1, 2,…, a} be the set of a possible actions

that can be taken for an input pattern x

  • Let (i | j) be the loss incurred for taking

action i when the true state of nature is j

  • Decision rule: (x) specifies which action to take for every

possible observation x

slide-17
SLIDE 17

Conditional Risk Overall risk R = Expected value of R(i | x) w.r.t. p(x) Minimizing R Minimize R(i | x) for i = 1,…, a

Conditional risk

 

c j 1 j j j i i

) x | ( P ) | ( ) x | ( R     

For a given x, suppose we take the action i

  • If the true state is j , we will incur the loss (i | j)
  • P(j | x) is the prob. that the true state is j
  • But, any one of the C states is possible for given x
slide-18
SLIDE 18

Select the action i for which R(i | x) is minimum

  • This action minimizes the overall risk
  • The resulting risk is called the Bayes risk
  • It is the best classification performance that can be

achieved given the priors, class-conditional densities and the loss function!

slide-19
SLIDE 19
  • Two-category classification

1 : decide 1 2 : decide 2 ij = (i | j); loss incurred in deciding i when the true

state of nature is j

Conditional risk:

R(1 | x) = 11P(1 | x) + 12P(2 | x) R(2 | x) = 21P(1 | x) + 22P(2 | x)

slide-20
SLIDE 20

Bayes decision rule is stated as: if R(1 | x) < R(2 | x)

Take action 1: “decide 1”

This rule is equivalent to: decide 1 if: {(21- 11) P(x | 1) P(1)} > {(12- 22) P(x | 2) P(2)}; decide 2 otherwise

slide-21
SLIDE 21

In terms of the Likelihood Ratio (LR), the preceding rule is equivalent to the following rule: then take action 1 (decide 1); otherwise take action 2 (decide 2) The “threshold” term on the right hand side now involves the prior and the loss function

) ( P ) ( P . ) | x ( P ) | x ( P if

1 2 11 21 22 12 2 1

         

slide-22
SLIDE 22

Interpretation of the Bayes decision rule:

If the likelihood ratio of class 1 and class 2 exceeds a threshold value (independent of the input pattern x), the optimal action is: decide 1 Maximum likelihood decision rule is a special case

  • f minimum risk decision rule:
  • Threshold value = 1
  • 0-1 loss function
  • Equal class prior probability
slide-23
SLIDE 23

Bayesian Decision Theory (Sections 2.3-2.5)

  • Minimum Error Rate Classification
  • Classifiers, Discriminant Functions and Decision Surfaces
  • Multivariate Normal (Gaussian) Density
slide-24
SLIDE 24

Minimum Error Rate Classification

  • Actions are decisions on classes

If action i is taken and the true state of nature is j then: the decision is correct if i = j and in error if i  j

  • Seek a decision rule that minimizes the probability
  • f error or the error rate
slide-25
SLIDE 25
  • Zero-one (0-1) loss function: no loss for correct decision

and a unit loss for incorrect decision The conditional risk can now be simplified as: “The risk corresponding to the 0-1 loss function is the average probability of error” c ,..., 1 j , i j i 1 j i ) , (

j i

         

 

  

   

1 j i j c j 1 j j j i i

) x | ( P 1 ) x | ( P ) x | ( P ) | ( ) x | ( R       

slide-26
SLIDE 26
  • Minimizing the risk under 0-1 loss function requires

maximizing the posterior probability P(i | x) since R(i | x) = 1 – P(i | x))

  • For Minimum error rate
  • Decide i if P (i | x) > P(j | x) j  i
slide-27
SLIDE 27
  • Decision boundaries and decision regions
  • If  is the 0-1 loss function then the threshold

involves only the priors:

b 1 2 a 1 2

) ( P ) ( P 2 then 1 2 if ) ( P ) ( P then 1 1          

 

                     

 

               ) | x ( P ) | x ( P : if decide then ) ( P ) ( P . Let

2 1 1 1 2 11 21 22 12

slide-28
SLIDE 28
slide-29
SLIDE 29

Classifiers, Discriminant Functions and Decision Surfaces

  • Many different ways to represent classifiers or

decision rules;

  • One of the most useful is in terms of “discriminant

functions”

  • The multi-category case
  • Set of discriminant functions gi(x), i = 1,…,c
  • Classifier assigns a feature vector x to class i if:

gi(x) > gj(x) j  i

slide-30
SLIDE 30

Network Representation of a Classifier

slide-31
SLIDE 31
  • Bayes classifier can be represented in this way, but

the choice of discriminant function is not unique

  • gi(x) = - R(i | x)

(max. discriminant corresponds to minimum risk)

  • For the minimum error rate, we take

gi(x) = P(i | x)

(max. discrimination corresponds to max. posterior!) gi(x)  P(x | i) P(i) gi(x) = ln P(x | i) + ln P(i)

(ln: natural log)

slide-32
SLIDE 32
  • A decision rule partitions the feature space into c

decision regions if gi(x) > gj(x) j  i then x is in Ri In region Ri input pattern x is assigned to class i

  • Two-category case
  • Here a classifier is a “dichotomizer” that has two

discriminant functions g1 and g2 Let g(x)  g1(x) – g2(x) Decide 1 if g(x) > 0 ; Otherwise decide 2

slide-33
SLIDE 33
  • A “dichotomizer” computes a single

discriminant function g(x) and classifies x according to whether g(x) is positive or not

  • Computation of g(x) = g1(x) – g2(x)

) ( P ) ( P ln ) | x ( P ) | x ( P ln ) x | ( P ) x | ( P ) x ( g

2 1 2 1 2 1

         

slide-34
SLIDE 34
slide-35
SLIDE 35

The Normal Density

  • Univariate density: N( , 2)
  • Normal density is analytically tractable
  • Continuous density with two parameters (mean, variance)
  • A number of processes are asymptotically Gaussian (CLT)
  • Patterns (e.g., handwritten characters, speech signals ) can be

viewed as randomly corrupted (noisy) versions of a single typical or prototype pattern

where:  = mean (or expected value) of x 2 = variance (or expected squared deviation) of x

, x 2 1 exp 2 1 ) x ( P

2

                    

slide-36
SLIDE 36
slide-37
SLIDE 37
  • Multivariate density: N( , )
  • Multivariate normal density in d dimensions:

where: x = (x1, x2, …, xd)t (“t” stands for the transpose of a vector)  = (1, 2, …, d)t mean vector  = d*d covariance matrix || and -1 are determinant and inverse of , respectively

  • Covariance matrix is symmetric and positive semidefinite; we assume 

is positive definite so the determinant of  is strictly positive

  • Multivariate normal density is completely specified by [d + d(d+1)/2]

parameters

  • If variables x1 and x2 are “statistically independent” then the covariance
  • f x1 and x2 is zero.

         

) x ( ) x ( 2 1 exp ) 2 ( 1 ) x ( P

1 t 2 / 1 2 / d

    

slide-38
SLIDE 38

Multivariate Normal density

2 1

( ) ( )

t

r x x  

    Samples drawn from a normal population tend to fall in a single cloud or cluster; cluster center is determined by the mean vector and shape by the covariance matrix The loci of points of constant density are hyperellipsoids whose principal axes are the eigenvectors of 

squared Mahalanobis distance from x to 

slide-39
SLIDE 39

Transformation of Normal Variables

Linear combinations of jointly normal random variables have normal distribution Linear transformation can convert an arbitrary multivariate normal distribution into a spherical one (“Whitening”)

slide-40
SLIDE 40

Bayesian Decision Theory (Sections 2.6 to 2.9)

  • Discriminant Functions for the Normal Density
  • Bayes Decision Theory – Discrete Features
slide-41
SLIDE 41

Discriminant Functions for the Normal Density

  • The minimum error-rate classification can be

achieved by the discriminant functions gi(x) = ln P(x | i) + ln P(i), I =1, 2,.., c

  • In case of multivariate normal densities

) ( P ln ln 2 1 2 ln 2 d ) x ( ) x ( 2 1 ) x ( g

i i 1 i i t i i

           

slide-42
SLIDE 42
  • Case i = 2.I

(I is the identity matrix)

Features are statistically independent and each feature has the same variance irrespective of the class

) category! th the for threshold the called is ( ) ( P ln 2 1 w ; w : where function) nt discrimina (linear w x w ) x ( g

i i i t i 2 i 2 i i i t i i

i             

slide-43
SLIDE 43
  • A classifier that uses linear discriminant functions is called

“a linear machine”

  • The decision surfaces (boundaries) for a linear machine

are pieces of hyperplanes defined by the linear equations:

gi(x) = gj(x)

slide-44
SLIDE 44
  • The hyperplane separatingRi and Rj

is orthogonal to the line linking the means! ) ( ) ( P ) ( P ln ) ( 2 1 x

j i j i 2 j i 2 j i

             

) ( 2 1 x then ) ( P ) ( P if

j i j i

      

slide-45
SLIDE 45
slide-46
SLIDE 46
slide-47
SLIDE 47
slide-48
SLIDE 48
  • Case 2: i =  (covariance matrices of all classes

are identical, but otherwise arbitrary!)

  • Hyperplane separating Ri and Rj
  • The hyperplane separating Ri and Rj is generally

not orthogonal to the line between the means!

  • To classify a feature vector x, measure the

squared Mahalanobis distance from x to each of the c means; assign x to the category of the nearest mean

 

) .( ) ( ) ( ) ( P / ) ( P ln ) ( 2 1 x

j i j i 1 t j i j i j i

                

slide-49
SLIDE 49
slide-50
SLIDE 50
slide-51
SLIDE 51
  • Case 3: i = arbitrary
  • The covariance matrices are different for each category

In the 2-category case, the decision surfaces are hyperquadrics that can assume any of the general forms: hyperplanes, pairs of hyperplanes, hyperspheres, hyperellipsoids, hyperparaboloids, hyperhyperboloids)

) ( P ln ln 2 1 2 1 w w 2 1 W : where w x w x W x ) x ( g

i i i 1 i t i i i 1 i i 1 i i i t i i t i

                 

  

slide-52
SLIDE 52

Discriminant Functions for 1D Gaussian

slide-53
SLIDE 53

Discriminant Functions for the Normal Density

slide-54
SLIDE 54
slide-55
SLIDE 55

Discriminant Functions for the Normal Density

slide-56
SLIDE 56

Discriminant Functions for the Normal Density

slide-57
SLIDE 57

Decision Regions for Two-Dimensional Gaussian Data

2 1 1 2

1875 . 125 . 1 514 . 3 x x x   

slide-58
SLIDE 58

Error Probabilities and Integrals

  • 2-class problem
  • There are two types of errors
  • Multi-class problem

– Simpler to computer the prob. of being correct (more ways to be wrong than to be right)

slide-59
SLIDE 59

Error Probabilities and Integrals

Bayes optimal decision boundary in 1-D case

slide-60
SLIDE 60

Error Rate of Linear Discriminant Function (LDF)

  • Assume a 2-class problem
  • Due to the symmetry of the problem (identical

), the two types of errors are identical

  • Decide if or
  • r

1

x  

1 2

( ) ( ) g x g x 

   

1 1 1 2 1 1 2 2

1 1 ( ) ( ) log ( ) ( ) ( ) log ( ) 2 2

t t

x x P x x P      

 

          

 

 

1 1 1 1 2 2 1 1 1 2 2

1 ( ) log ( )/ ( ) 2

t t t

x P P        

  

      

   

 

1 1 2 2 1

~ ( , ), ~ ( , ) 1 ( ) log ( ) ( ) ( ) log ( ) 2

t i i i i i

p x N p x N g x P x x x P        

            

slide-61
SLIDE 61
  • Let
  • Compute expected values & variances of

when where = squared Mahalanobis distance between

 

1 1 1 2 1 1 1 2 2

1 ( ) ( ) 2

t t t

h x x      

  

      

( ) h x

1 2

& x x    

 

1 1 1 1 1 1 2 1 1 1 2 2 1 2 1 2 1

1 ( ) ( ) 2 1 ( ) ( ) 2

t t t t

E h x x E x              

   

                       

1

1 2 1 2 1

( ) ( )

t

   

  

1 2

&  

Error Rate of LDF

slide-62
SLIDE 62
  • Similarly

1 2 2 1 2 1

1 ( ) ( ) 2

t

     

      

   

1 2

( ) ~ ( ,2 ) ( ) ~ ( ,2 ) p h x x N p h x x N          

 

2 2 1 1 1 1 1 2 1 1 1 2 1 2 1

( ) ( ) ( ) ( ) ( ) 2

t t

E h x E x x            

 

                   

2 2

2   

Error Rate of LDF

slide-63
SLIDE 63

   

2

1( ) 2 1 1 2 1 1 1 2 2

1 ( ) ( ) ( ) ( ) ~ 2 2 1 2 1 1 2 2 4

t n t

P g x g x x P h x dh h x e e d t erf

 

      

    

                  

 

Error Rate of LDF

slide-64
SLIDE 64

2

1 2 2 1 1 2 2

( ) log ( ) 2 ( ) 1 1 2 2 4 Total probability of error ( ) ( )

r x e

P t P erf r e dx t erf P P P         

                     

Error Rate of LDF

slide-65
SLIDE 65

   

1 2 1 1 2 1 2 1 2

1 2 ( ) ( ) 1 1 1 1 2 2 2 2 4 2 2

t

P P t erf erf          

                           

Error Rate of LDF

1 1 2 1 2 1 2 1 1 2 1 2 1 2

Mahalanobis distance is a good measure of separation between classes

(i) No Class Separation ( ) ( ) 1 2 (ii) Perfect Class Separation ( ) ( ) ( 1)

t t

erf            

 

              

slide-66
SLIDE 66

Error Bounds for Normal Densities

  • The exact calculation of the error for the

general Guassian case (case 3) is extremely difficult

  • However, in the 2-category case the general

error can be approximated analytically to give us an upper bound on the error

slide-67
SLIDE 67

Chernoff Bound

  • To derive a bound for the error, we need the

following inequality

Assume conditional prob. are normal where

slide-68
SLIDE 68

Chernoff Bound

Chernoff bound for P(error) is found by determining the value of  that minimizes exp(-k())

slide-69
SLIDE 69

Error Bounds for Normal Densities

  • Bhattacharyya Bound
  • Assume  = 1/2
  • computationally simpler
  • slightly less tight bound
  • Now, Eq. (73) has the form

When the two covariance matrices are equal, k(1/2) is te same as the Mahalanobis distance between the two means

slide-70
SLIDE 70

Error Bounds for Gaussian Distributions

Chernoff Bound Bhattacharya Bound (β=1/2)

2–category, 2D data

True error using numerical integration = 0.0021 Best Chernoff error bound is 0.008190 Bhattacharya error bound is 0.008191

1 1 1 1 1 2

( ) ( ) ( ) ( | ) ( | ) 1 P error P P p x p x dx

   

    

 

  

1 ( ) 1 2

( | ) ( | )

k

p x p x dx e

  

 

 

1 1 2 1 2 1 1 2 2 1 1 2

(1 ) (1 ) 1 ( ) ( ) [ (1 ) ] ( ) ln 2 2 | | | |

t

k

 

          

 

              

(1/2) 1 2 1 2 1 2

( ) ( ) ( ) ( | ) ( | ) ( ) ( )

k

P error P P P x P x dx P P e      

 

1 2 1 1 2 2 1 2 1 1 2

1 2 (1 / 2) 1 / 8( ) ( ) ln 2 2 | || |

t

k    

         

   

slide-71
SLIDE 71

We are interested in detecting a single weak pulse, e.g. radar reflection; the internal signal (x) in detector has mean m1 (m2) when pulse is absent (present)

Signal Detection Theory

Discriminability: ease of determining whether the pulse is present or not

The detector uses a threshold x* to determine the presence of pulse

2

( *| ): P x x x   

hit

1

( *| ): P x x x   

false alarm

2

( *| ): P x x x   

miss

1

( *| ): P x x x   

correct rejection For given threshold, define hit, false alarm, miss and correct rejection

2 1 1

( | ) ~ ( , ) p x N   

2 2 2

( | ) ~ ( , ) p x N   

1 2

| | ' d     

slide-72
SLIDE 72

Receiver Operating Characteristic (ROC)

  • Experimentally compute hit and false alarm rates for

fixed x*

  • Changing x* will change the hit and false alarm rates
  • A plot of hit and false alarm rates is called the ROC

curve Performance shown at different

  • perating points
slide-73
SLIDE 73

Operating Characteristic

  • In practice, distributions may not be Gaussian

and will be multidimensional; ROC curve can still be plotted

  • Vary a single control parameter for the decision

rule and plot the resulting hit and false alarm rates

slide-74
SLIDE 74

Bayes Decision Theory: Discrete Features

  • Components of x are binary or integer valued; x

can take only one of m discrete values v1, v2, …,vm

  • Case of independent binary features for 2-

category problem Let x = [x1, x2, …, xd ]t where each xi is either 0

  • r 1, with probabilities:

pi = P(xi = 1 | 1) qi = P(xi = 1 | 2)

slide-75
SLIDE 75
  • The discriminant function in this case is:

g(x) if and g(x) if decide ) ( P ) ( P ln q 1 p 1 ln w : and d ,..., 1 i ) p 1 ( q ) q 1 ( p ln w : where w x w ) x ( g

2 1 2 1 d 1 i i i i i i i i i d 1 i i

           

 

 

   

slide-76
SLIDE 76

Bayesian Decision for 3-dim Binary Data

Left figure: pi=.8 and qi=.5. Right figure: p3=q3 (feature 3 does not provide any discriminatory information) so the decision surface is parallel to x3 axis

  • A 2-class problem; 3 independent binary features; class priors

are equal; pi = 0.8 and qi = 0.5, i = 1,2,3

  • wi = 1.3863; w0 = 1.2
  • Decision surface g(x) = 0 is shown below
slide-77
SLIDE 77

Neyman-Pearson Rule

“Classification, Estimation and Pattern recognition” by Young and Calvert

slide-78
SLIDE 78

Neyman-Pearson Rule

slide-79
SLIDE 79

Neyman-Pearson Rule

slide-80
SLIDE 80

Neyman-Pearson Rule

slide-81
SLIDE 81

Neyman-Pearson Rule

slide-82
SLIDE 82

Neyman-Pearson Rule

slide-83
SLIDE 83

Missing Feature Values

  • n x d pattern matrix; n x n (dis)similarity matrix
  • Suppose it is not possible to measure a certain

feature for a given pattern

  • Possible solutions:
  • Reject the pattern
  • Approximate the missing value
  • Replace missing value by mean for that feature
  • Marginalize over distribution of the missing feature
slide-84
SLIDE 84

Handling Missing Feature value

slide-85
SLIDE 85

Other Topics

  • Compound Bayes Decision Theory & Context

– Consecutive states of nature may be dependent; state

  • f next fish may depend on state of the previous fish

– Exploit such statistical dependence to gain improved performance (use of context) – Compound decision vs. sequential compound decision – Markov dependence

  • Sequential Decision Making

– Feature measurement process is sequential – Feature measurement cost – Minimize a combination of feature measurement cost and the classification accuracy

slide-86
SLIDE 86

Context in Text Recognition