Docsity

Deriving Bayes Classifier: An Example from NPTEL Course, Slides of Design and Analysis of Algorithms

Partial preview of the text

Download Deriving Bayes Classifier: An Example from NPTEL Course and more Slides Design and Analysis of Algorithms in PDF only on Docsity!

Recap^ •

We have studied the Bayes Classifier last class. PR NPTEL course – p.1/

Recap^ •

We have studied the Bayes Classifier last class.

  • We have seen the Bayes classifier for general lossfunction and proved its optimality. PR NPTEL course – p.2/

An Example

Consider another example of deriving Bayes classifier.

  • Suppose we have

K

classes. The classifier is allowed the option to ‘reject’ a pattern and this is done by theclassifier assigning class

K

to the pattern. PR NPTEL course – p.4/

An Example

Consider another example of deriving Bayes classifier.

  • Suppose we have

K

classes. The classifier is allowed the option to ‘reject’ a pattern and this is done by theclassifier assigning class

K

to the pattern. Define the loss function by

L

i, j

if i

j and i, j

, K

ρ m if i

, K,

and i

j

ρ r if i

K

PR NPTEL course – p.5/

Example Contd.^ •

Recall that the Bayes classifier is h B

X

α i if R

α i

X

R

α j

X

j. where

R

α i

X

K ∑^ j =

L

α i

, C

j

q j

X

) PR NPTEL course – p.7/

Example Contd.^ •

Recall that the Bayes classifier is h B

X

α i if R

α i

X

R

α j

X

j. where

R

α i

X

K ∑^ j =

L

α i

, C

j

q j

X

  • So, we now need to calculate

R

α i

X

for different actions, α i available to the classifier. PR NPTEL course – p.8/

  • For α i

, K

, we have

L

α i

, C

j

ρ m if α i

C

j and it is zero otherwise.

  • Hence,

R

i

X

j 6 = i ρ m q j

X

ρ m

q i

X

. PR NPTEL course – p.10/

  • For α i

, K

, we have

L

α i

, C

j

ρ m if α i

C

j and it is zero otherwise.

  • Hence,

R

i

X

j 6 = i ρ m q j

X

ρ m

q i

X

.

  • Also,

R

K

X

j ρ r q j

X

ρ r PR NPTEL course – p.11/

  • For α i

, K

, we have

L

α i

, C

j

ρ m if α i

C

j and it is zero otherwise.

  • Hence,

R

i

X

j 6 = i ρ m q j

X

ρ m

q i

X

.

  • Also,

R

K

X

j ρ r q j

X

ρ r

  • Hence, h B

X

i ,

i

K

, if ρ m

q i

X

ρ m

q j

X

j and ρ m

q i

X

ρ r PR NPTEL course – p.13/

  • We have, h B

X

i ,

i

K

, if ρ m

q i

X

ρ m

q j

X

j and ρ m

q i

X

ρ r PR NPTEL course – p.14/

  • We saw, h B

X

i ,

i

K

, if (i). q i

X

q j

X

j , and (ii). q i

X

ρ r ρ m ; else h B

X

K

. PR NPTEL course – p.16/

  • We saw, h B

X

i ,

i

K

, if (i). q i

X

q j

X

j , and (ii). q i

X

ρ r ρ m ; else h B

X

K

.

  • If ρ r

ρ m PR NPTEL course – p.17/

  • We saw, h B

X

i ,

i

K

, if (i). q i

X

q j

X

j , and (ii). q i

X

ρ r ρ m ; else h B

X

K

.

  • If ρ r

ρ m

  • Never reject a patter!

    If ρ r

PR NPTEL course – p.19/

  • We saw, h B

X

i ,

i

K

, if (i). q i

X

q j

X

j , and (ii). q i

X

ρ r ρ m ; else h B

X

K

.

  • If ρ r

ρ m

  • Never reject a patter!

    If ρ r
  • Always reject the pattern (unless you are absolutely sure) PR NPTEL course – p.20/