You are on page 1of 8

1Apply Naive bayes clanijin algaithm tdi the follewin dataset

Outlook emp umidity |indy |lay4ol


No
Rainy Het igh False
No
Rainy Hot
igh TYue

6vercaat Hot tgh Fale '


Sunny Nild igh False Yey
Sunny Cook Normal False ye

Sunny Cool Novmod True No


8vercast Coo Mormal True e

Rainy Mild
tigh Fale No

Reiny Cod Norma Falye Ycs


Sunny Mild Nosmad Faue
Mild Novmel
Rainy TYut
vercast Mild Htgh TIUe ye
Overcast tot Normod False Yey

Sunny Mild High Tue NO

Find out clas o given Sample


Gutlook ainy, tetmp = Cool, humidity : high, windy -Tu
Naive Bay Algoxithm woxku baed on posteRLOR PROBABILTY

PI)P(Y¢)PCc) C
- clas
PCx) -instan e
Yequenty table duttook ikelihoool Jable outlook
Play 4ol Play 4o6
Outtook Yes NO Gutook Ye No

Sunny 3 2 Sunny 3a /s
vencast Ove TcasE 414
Rainy Ralny s/
5/4
Temp Likedihood Tahle
Fyequency Table
Temp Yes NU
Ploy Gol
ttot
Temp Yes No

tet 2 Mild 4la 25 64


Mild Coo
Ccol

umidi y Liketihod tabl e


equeny Tauble play 4ot
Humidity Play Golt ttumidity Yes N
Ye NO igh
Normal
igh
Noymal

aindy
Fyequen ty Table Likelthood Table
play helb Play elt
windy Yes No windy Ve NO

Tue 3 TYue ls
False 62 Falye lq s

PCYea() PLRainy/Ye):P(coek/¥ea)xelhigh)Ye) x PCTuc/va)x Plve)

O 00529
PNO () - PRainy (wo) e(cool xnNo)xP( high (no) xp(Tiue [No)xP(n)

- 0O059

PCYes/) 2 p(nolz ) outceme is NO


(msidov K:9 and ffmd
PP9 K-auk Neighbo Alaorithm to t-tollouoig doatajtt
Ceprudoídth 2.4. ye Hahathn bicna
TI lam to thu giun sapla sepal lunqtrh 5
Manhattrh pisuns
Sepa lungth Seprd width SpecLes
3:1 Satosa I 6 - 3 412-2-:2
3.S Stasa C--i|4|2-2| 1
32 3:0 vidinica
IS6-4214 13-0 -2.4|: 19
3.4 Setosa
3:3 I6-9+ 2.4-24|:0.1
S4 3:9 setosa
2 8 viSinica I-S4 3 -241: I)
61 vesicobY Is.4-41 + 12-4-2-+|:9
3 29 vivSimica s6-44+ 12-8-2-41 1-9
2:7 VEsicofor
6 Iss-6-1 + |2s -2-| 0-6
2 viTinica
6-3 2:3 VeYsicolorY 5642 + |2:9-2-4 :9

VDSIColOY15-60
VsicalovY
+ 2:7 -2-3l o1
6:3 sS-+ 12t -271 p
Vciolor
163-61+ |2-t-2:s|zl
S1-S-+ |2:3-2-T|0.
eTAt eighbouens aru 20-1
163-S-6 + |2S- 2
(S.8, 2-8 vnginita) (6:012 4vOsicolor), sS-S-+ l2-z-2-41-{0.9

(s52-4 VsÍLcbr (61,25 vUGILCloY)-


AS mayorty clam fabu ot 4 neaut reighbour i vevicalor. co the tut Sample

belngs to VAvsitdor

3 luta hos Support vector mochime Can be wed for clowisiatiom ot


Seperale data.
lineonly
A a datruet an be clausisieel mto 2 chmes by usnya Aingle shnigh
fin tun ulh datu is tvmd as nealy ceperoble daton

Ctnside a tudo dam dodajut hauing 1 umeric eatuts and tuwo posible

claus fabl-1 and 41


Ltt tw vector - 1an) ¢prejeut tlu valus of tatnts m onu ntn
ue Can
of te datat We ay that tuu datoset is lmeoly AtDerable if
fmd a hypephru in tu dinuuprct vetor spac " ay.
d t ,, t - .-dn n <0
haufng the otlowing pMopexties
each nutance oith label- 1 we haye

nh20
2 d eauh instante i uith clays tabel + oe have
t dXt X2 n >0
Algonithm ko tfnd SVM claniien
Given tuwo-clays Jinearly Beperabe datuet eN pofnk ot the
m C ) C,9a)- --(Xn,Ja),whae y; is úthen ti -

Step-1 Find d l d d d) ohith maximi3

Subjet k e
i
i i -0
o tSt i=1,21 - - -N

Stup Computt w
1

tp3.emprnen b:4[ miai * Co.Ti)+nax f:yi:-1 (ü,Z,)|


Step yJhe SVM dauitien tunetion is given by
F(a)= w .7 -b
dnete d is hon 3cro only it 1 S a Suppott yeetsn

4 Explain about logisttc yesion a th ^uitable nample


ALogisHc RegteiYon s an examples e Supervised machineeaning
4 t is ud to Calculate paedict the paobability et binaylt
NO) event OCCwung

hee e ued to 9lve clasiticoakion poroblem


4t ued t pyedicting the attgsdtal elepend on vaxiabe

wing a given set a independent vadab e)


g i v e s probabilivtic values which li bupeep O and
Jn his t "s"
coe
shaped loqistic funion uhich pedi ci
value (o 81 i)
Jhe
uveem leqi'stte tnetion indialcs the ltrelihood o6
Semethirq suh a whethe the c , (ancenoul & iot,a ave
moue is beie & not bacd on ils weiqht ct

S-COve
/y-08
-S|
Threshold value
y 0.3

equatien legistic Keapcsien


le btba tby X1 t- --+ bnx
E o predict ohthe an email is pam &i not ohethen tumcu
is matiqmant & net
5 Lhat is bauk propagati on? ¬zplain in detaiL about baek
iop agation alg&uthm.
ABak prop.agatien is nunal nctuork sh&t m o"backuad
POpagakien
i s a andand method ot treioing atifiial neutal ntwsk
h i k method heps Calculake the gadiant st a lev tunction
wt ol the wight in the network.

nput Output

6,
4 nput 2 Outpul 2

o1

O
Algorithm
Step 1 ni tialize
(onnectí on weight into Amall nandom Vdu ej
sep Paes ent the pth Aample input vedtth ot patt en
the
Yp-(rese
and C8uaponding output taxget XPe)
TeCTPTP. -. Tpnm to the nutwok
stp3 Pan he input value) to the
ach p node i in
ivt layen , lauyoul. t
layen0, PebimYoi
¥p;
Stpy: om evey newim i n eveuy layo j ,2 -t4(no
nd the output om nuoh.
layc

Dk
n e o n în laye Cj-0 to the
th nenen in lay or.
where 4()
texpl-0
Stps: t p u t Valud obtained For evexy Oukput node i in lay en M,

Putum Opi Y Op: Atual output by w Gucyponding


to tsaining Sam a
Sttp6: Calcudate eud value Sji toi evey newon í in ewey layen
in bakuarl den : N, M-1, - - 2, 1. om eutput to input layn
tou cwed by tocight adjustnenti. Ta tho olp layn toa value is
Si Y (Y) (Te;-Yi)
tE kidden layeu,
Njt

he weight adjutment an be done t8i eveuy connection f


neuen k in layen j - ) te evey neuen j in evey ayen i

jie
wcight adjukmentaci b/w dkn
stp9 he ackions in p2 thngh 6oill napeated fon
eveuy iaining ample pott eun p and upeatcd fi thege
sets until Scum eF SqLo0) Oukput tuiy i's minimiz d
6 what is ANN 2
¬xplain
about peneptren in ANN
fNANN stand ta Arlijiial dual Netoonk
tmodcls the ulationship betuwecn a 4et
an 6utput
el input ignals and
bignal uing moded doni ved om ow undn
a

ohow a biologi cal bvaên Acsponds to Ximuli fiom standin9


Jemuty
inpub
Just Like bsain, ANN wu a
netuwork ot atitiias neuor, b
nodes to Aolve leaninaq
poble m
tis xobut to emay in the training data and has beum
Sue emfully applied to pxoblems xuch as inknpretirg visuas
Scene and
pecch eogni fien eaning obet (ontot strattaiu
Peephen
i s an arti ficdal neunOn in chich the
activation tuntien s
the threhold tunti on
Censiden an atificial neuxenhavinq 1,2- h a the input Kqral
and , w - -

- w, as the auouatel wugkts t Wo be a (enutan


he newron is Called percepkicn ît the
is given by
eutput othe ncuzen
the tunticn
(, -In) o t X +W2l2t +WnXh>0
wot 07,t°22t- -t wn n 2o
-

Schem atic Repxaentatien .


o

Oukput (

wise
Penccptaon is dingle Rarge neual nettwork that censiv fouun
net Sum and
main panameeu named nput valuc, bia8, weight ,

akivai on untien
al
Hexceptio Pencepten mode begins oith the multipfication o
input values weights , then add theue valuej toqethon
Coeat weiqhkA ium.
hen this weighed Sum is applied te activatten tunctien P
t ehtain desived output

You might also like