Sie sind auf Seite 1von 4

Machine Learning 1 5CS73 VTU B.E.

7rh Semester

MODULE 4

' Consider a medical diagnosis problem in which there are two alternative hypotheses: 1.
that the patient has a particular form of cancer (+) and 2. That the patient does not (-). A
patient takes a lab test and the result comes back poslliyg, The test returns a correct
positive result in only 98% of the cases in which the disease is actually present, and a
correct negative result in only 97% of the cases in which the disease is not present.
Furthermore, .008 of the entire population have this cancer. Detennihe *hether the
patiept has Cancer or not using MAP hypothesis" l.-,,..,,

Sou*irn : -
+ fprvr -t4.r o-bout llluAf\n^ , p nb6bi.Ufu Wn be )unrrwn;-ytl
AJ fotl"our
-
t"
ttttt":t'

| (co,nua) A nn?
, U'VU0 O/>tn,r,t,'\ ^ rlrr(\L
- U,11
;[ 1r,r,,,",t-\./tl-
mn,9 nf r
P (@ lo^i,t '- U-\d ? I€'I -l
I L\--'l |
rrvntrr\'
\ )1
''\'\'t',.) O-)L
P(Ol-co t*rJ=0.03 ,f (Oh,"rt )= 0-q?
6nt"U un aro.XnoS,.
,-if."
.. p,r a,4 futr.-;i Co,nl-fl 6
^"r7
P(Ol **) lC**";, (0.q4* [0.0y) = o.al+s
nf - I \
ll,( O I tt*nc,D p[f
^
6,6.r,&t . 0.oS x 0"qq2 = 0. o}ql.
eo,
,l:::: ,:::,,:::,:
hllVl
,il::::::,:,, : ftP = - (XftW
=:=-

It{ P84d6 prubub*W Wn at4n bu ce-tt*wirt


c&atrt

')Su",'l "tn !" u 4rw abo'le. 1u*rtJtlru so 1l,o,t' 'tl,I


n&'rweijiry

* 9'0al q--, :: 0"21


?(wt,to.'l @) .=

0- N+8 I o"o 2qg F#-


? (: cmanl O) ' a"g2Lg--:-: E o "qq
o-0o4B4 o"02q8 :=:==:_=
D, Arrt. Ptof"so., Dept. of CS&E , CanaraEngg. College, Mangaluru L*t
Machine Learning 1 5CS73 VTU B.E. 7rh Semester

'{nnll Naive Bayes classifier for PlayTennis concept leaming problem to classify the
following novel instance

< Outlook: sunny, Temperature: cool, Humidity: high, Wind: strong >

Day Outlook Temperature Humidity Wind PlavTennis


D1 Sunny Hot High Weak No
D2 Sunny Hot High Strong No
D3 Overcast Hot High Weak Yes
D4 Rain Mild High Weak Yes
D5 Rain Cool Normal Weak Y0S
D6 Rain Cool Normal Strong No
D7 Overcast Cool Normal Strong Yes
D8 Sunny Mild High Weak No
D9 Sunny Cool Normal Weak Yes
D10 Rain Mild Normal Weak Yes
Dl1 Sunny Mild Normal Strong Yes
D12 Overcast Mild High Strong Yes
D13 Overcast Hot Normal Wbak Yes
Dl4 Rain Mild FIigh Strong No
Table: Training examples foith" turg"t coiepF@Frnri

,,,,,,,
To,,\K U 1a.,,,,, p *rrv- xaqu tt I

t,
\ro.trrr (ffo n-!o) q
-+l'.L {urq.t @rrwc flu1Tcnnis
ul t- r 4h;,r'nt,
J6t ^. ' T
lr -.r t ,,trr-) Wt\rfun{t
0

V^,3 =
ry^'*"
e
Ptri)Tl
{Jq , noJ
p(qi tuJ) <- eq^o
T

v;= P(tJ) P(0*tmor =sunng lvr) .


,ruffi"
P[r,*p = QDt [q) " plur*r;q :l"ylr,) . p(rol,hd ,st
t]u,J

Deepak D, Asst. professor, De of C!4E{3nuru Engg. College, Mangaluru


)(;
,\'!;trrhitrc l.cartritrg I 5('S 7:t VTU B.E CSE 7'hSemester

4 fin* {Ke p robo-bil,{.tiq


r -f{^, rl

I&tc1e-t
fit:a,rrt \)O,luU A
e.If,inrro,r^a) VWil X U
W) -lfuiz Outl l1 teoin;' *
uomqh{ fiutntiu U

P ( PQfennrr =V*) -*9-


t+
= 0.6+
PtPQnn',): ru): _Lz 0 "76
t+
"0(
nltn^t , ufuatt * (,,n&l\*rl*t p^obahuif'Ll

?(our.lo**Sunnf 1pqlnnic,yr6)=
+ = 0.22
p (sntUr'f , s,,nry I
?qTcnni.r"L;= + = 0,60
P (oTnry= bur t rbtyr\u
= 3q_ = 0.33
Ptf,*p=b'1, lttnyfrnn[""*)= +
+ = 0.20
P [Uu*iaif1= h{AA nrr^M ,,,/q) = r/q = o. j3
I p

f [+"*\dif'/ ; ]v:ql lp%Tnnis, ,5 , +/f = 0.80


n :r*d lnqr.nns=yq) ?
i;'tuf + = o,3s
,,,'f Itrtna'SffiT llhTnrus" r*j"
t;...,i;ii,..'',J,s t s 0*60
4e nT+ vNrs unrrorg qunft-on C
= pct;) ' p[sun-l rr.'rlr,*r , p$,ifr13"), lfurry1uo
z C.6tee g"Lg_x lru),
o.b3,k"0.JJ *0.33
e 0.0as3

I)eei:ak D, Asst. Professor-, Dept. of CS&E, Canara .r


4
Engg. Col Mangaluru I
ir4achinc Learrnirrg I 5('S7:t VTU B.E CSE 7'hSemester

pf'), , p(ual.) ,p(r\.uhln , p(sr,0,21,.")


P(sun'g[,,r)
) \/
F
0.036.N( 0"60 et O.LO * 0.80 e( 0.6o
0- 0Lo6
:----.-.--..-,

-Itu{ ,'tfu B%u UntfiA"i,


Pu.
Uotur "nou .f, nnd # W
#"*.,
+t . \ry,r
-|

t(u',
\r I

Pttt1T,nniu = AD

Ouf\no -F*g
tturniuiQ l,tlioel P1",1-lln*'s
\unnj [,Du( l'^.rgA Slrong n0

+& qryu@,,b )<w)


NrrnnJy;r,g bL, bLtu,tnh, 4"
Ma;itannJ probab',f-tt4
r.D0 ( t"tnu Va-bril.

''
iit::'

o"oo53 0,20s
>---
0.a052 t 0"0246

o,0206
0 19s
0.0 093 + 0.02o6 T

D"?"k D' Attt' Ptt ru Engg. college, MangalurLr

Das könnte Ihnen auch gefallen