1 of 25

Bayesian Decision Theory

2 of 25

Bayesian Decision Theory

  • Design classifiers to recommend decisions that minimize some total expected ”risk”.
    • The simplest risk is the classification error (i.e., costs are equal).
    • Typically, the risk includes the cost associated with different decisions.

3 of 25

Terminology

  • State of nature ω (random variable):
    • e.g., ω1 for sea bass, ω2 for salmon

  • Probabilities P(ω1) and P(ω2) (priors):
    • e.g., prior knowledge of how likely is to get a sea bass or a salmon

  • Probability density function p(x) (evidence):
    • e.g., how frequently we will measure a pattern with feature value x (e.g., x corresponds to lightness)

4 of 25

Terminology (cont’d)

  • Conditional probability density p(x/ωj) (likelihood) :
    • e.g., how frequently we will measure a pattern with feature value x given that the pattern belongs to class ωj

e.g., lightness distributions

between salmon/sea-bass

populations

5 of 25

Terminology (cont’d)

  • Conditional probability P(ωj /x) (posterior) :
    • e.g., the probability that the fish belongs to class ωj given measurement x.

6 of 25

Decision Rule Using Prior Probabilities

Decide ω1 if P(ω1) > P(ω2); otherwise decide ω2

or P(error) = min[P(ω1), P(ω2)]

  • Favours the most likely class.
  • This rule will be making the same decision all times.
    • i.e., optimum if no other information is available

7 of 25

Decision Rule Using Conditional Probabilities

  • Using Bayes’ rule, the posterior probability of category ωj given measurement x is given by:

where (i.e., scale factor – sum of probs = 1)

Decide ω1 if P(ω1 /x) > P(ω2 /x); otherwise decide ω2 or

Decide ω1 if p(x/ω1)P(ω1)>p(x/ω2)P(ω2) otherwise decide ω2

8 of 25

Decision Rule Using �Conditional pdf (cont’d)

P(ωj /x)

p(x/ωj)

9 of 25

Probability of Error

  • The probability of error is defined as:

or

  • What is the average probability error?

  • The Bayes rule is optimum, that is, it minimizes the average probability error!

P(error/x) = min[P(ω1/x), P(ω2/x)]

10 of 25

Where do Probabilities Come From?

  • There are two competitive answers to this question:

(1) Relative frequency (objective) approach.

    • Probabilities can only come from experiments.

(2) Bayesian (subjective) approach.

    • Probabilities may reflect degree of belief and can be based on opinion.

11 of 25

Prior and Posterior Probabilities

  •  

X

Y

A

A

B

A

B

A

B

B

B

A

12 of 25

Example (objective approach)

  • Classify cars whether they are more or less than $50K:
    • Classes: C1 if price > $50K, C2 if price <= $50K
    • Features: x, the height of a car

  • Use the Bayes’ rule to compute the posterior probabilities:

  • We need to estimate p(x/C1), p(x/C2), P(C1), P(C2)

13 of 25

Example (cont’d)

  • Collect data
    • Ask drivers how much their car was and measure height.
  • Determine prior probabilities P(C1), P(C2)
    • e.g., 1209 samples: #C1=221 #C2=988

14 of 25

Example (cont’d)

  • Determine class conditional probabilities (likelihood)
    • Discretize car height into bins and use normalized histogram

15 of 25

Example (cont’d)

  • Calculate the posterior probability for each bin:

16 of 25

A More General Theory

  • Use more than one features.
  • Allow more than two categories.
  • Allow actions other than classifying the input to one of the possible categories (e.g., rejection).
  • Employ a more general error function (i.e., “risk” function) by associating a “cost” (“loss” function) with each error (i.e., wrong action).

17 of 25

Terminology

  •  

18 of 25

Conditional Risk (or Expected Loss)

  • Suppose we observe x and take action αi

  • Suppose that the cost associated with taking action αi with ωj being the correct category is λ(αi / ωj)

  • The conditional risk (or expected loss) with taking action αi is:

19 of 25

Overall Risk

  • Suppose α(x) is a general decision rule that determines which action α1, α2, …, αl to take for every x; then the overall risk is defined as:

  • The optimum decision rule is the Bayes rule

20 of 25

Overall Risk (cont’d)

  • The Bayes decision rule minimizes R by:

(i) Computing R(αi /x) for every αi given an x

(ii) Choosing the action αi with the minimum R(αi /x)

  • The resulting minimum overall risk is called Bayes risk and is the best (i.e., optimum) performance that can be achieved:

21 of 25

Example: Two-category classification

  • Define
    • α1: decide ω1
    • α2: decide ω2
    • λij = λ(αij)

  • The conditional risks are:

(c=2)

22 of 25

Example: Two-category classification (cont’d)

  • Minimum risk decision rule:

or (i.e., using likelihood ratio)

or

>

threshold

likelihood ratio

23 of 25

Special Case:�Zero-One Loss Function

  • Assign the same loss to all errors:

  • The conditional risk corresponding to this loss function:

24 of 25

Special Case:�Zero-One Loss Function (cont’d)

  • The decision rule becomes:

  • In this case, the overall risk is the average probability error!

or

or

25 of 25

Example

(decision regions)

Decide ω1 if p(x/ω1)/p(x/ω2)>P(ω2 )/P(ω1) otherwise decide ω2

Assuming zero-one loss:

>

assume:

Assuming general loss: