Classifier based on
Maximum Likelihood (ML) Event (MLE)
and
Maximum-A-Posterior Probability (MAP)9: (Math 1.1) Animal scientists have found that the probability of finding small ears in Cats and Dogs
are 0.8 and 0.1, respectively. Suppose An animal is observed with Large Ears.
(i) What is the probability that the observed animal is a dog?
(ii) To which class the test animal will be classified by the MLE classifier - CAT or DOG?Cats and Dogs
= Suppose we have these conditional probability
mass functions for cats and dogs
= P(small ears | dog) = 0.1, P(large ears | dog) = 0.9
= P(small ears | cat) = 0.8, P(large ears | cat) = 0.2
= Observe an animal with large ears
likelihood = P (feature | class) ... caited likelihood of that
= Dog or a cat? particular feature in the given class
= Makes sense to say dog because probability of
observing large ears in a dog is much larger than
probability of observing large ears in a cat
ketinood) ® Prilarge ears | dog] = 0.9 > 0.2= Prilarge ears | cat] = 0.2
0 ===5 Classity as DOG" (Solved)
= Gore idéa’ ‘Of MLE “classifier: Choose the event of
largest probability, ie. maximum likelihood event (here, the
events are "being Dog" and "being Cat" and the Maximum
Likelihood event is "being Dog”we
Ocul) 2 P (apo) POD) mapa
ancien A
Pe Poster lo:
’ - ir Sad o
etal) = ae @ He)
pz Peature
OmQ: (Math 1.2) fish experts have found that the length of Salmon & Bass fishes follow Gaussian
distribution (i.e. Normal distribution) with mean of $ and 10 inches, respectively and vprince
of 1 and 4 inch’, respectively. A fish is observed with length of 7 inch. Explain how an (i) MLE and
(ii) MAP(Bayes) classifiers would classify it - Salmon or Bass? (iii) What will be the classification
decision by them if (a) Salmon & Bass are equally likely (b) Salmon is twice as likely as Bass?* Salmon’ length has distribution N(5,1) —zpianiurdasnaion)
Marnie
* Sea bass’s length has distribution N(10,4) rsvecives:
= Respected fish expert says that Fee
Probability
= Recall if rv. is Mei it's density isgersiy
p(l)=—— mo < resem the 'minus'in the
= Thus class Sppattional defisitie:
class conditional’ ia (07
Al saimoni=-—€ * 7 Hlbasd=— ia? zsLikelihood function
= Thus class conditional densities are
(us¥ (L107
All salmon)=—7—6 pl |ba: as)= ae ze
fixed fixed
= Fix length, let fish class vary. Then we get
likelihood function|(it is not density and not
probability mass function)
‘This is called
lass conditional probability 7 esr
deanity value: Ton? 2? if class= salmon
pl |class)= 1 (10?
fixed » 8 if class= bass
(Ze, likelihood of finding the as
fixed length of 'T'in the class ‘salmon’ or 'bass') *ML (maximum likelihood) Classifier
We would like to choose salmon if
Prilength=7 | salmor|> Prilength=7 | bass]
However, since length is a continuous r.v.,
Prilength=7 | salmon = Prilength= 7 | bass|=0
Instead, we choose class which maximizes likelihood
P| j=! -3F ol je “(-10F
J | salmon) =——e ? I |bass = e 74
| RS I
ML classifier: for an observed I:
2a
basg<
pll/salmon) ?p{I/bass) in words:itp(! | salmon) > p(l| bass),
classify as salmon, else classify as bass
> salmon(, (Math 13) Find the Deion Boundary betveen th Salon an Bas clases sed on the ent, when
aw pro kmoiede avalDecision Boundary
0.4
0.3)
0.2
O14
1G: What i decision Doundary? The Decision Boundary betveen
Stass fand clase i the ef of All Points where both the cases
Ihave equal likelihood value (MLE classifier), or equal posterior
probability value (Bayes classifier) or equal discrminant function
alue Gor the Minimum error rate Tassifier)
classify B ‘classify as sea\pass
— salmon
—— basson Rayon chassihie®) GRE
Be ianineh arate oe steel