ML Assignment 2
ML Assignment 2
(o ontext to
poepae e data tor Mh algon thms, wt a
noti
() Rato leantng
Most Me alo cont ok oth nisTng jeatnes. totalbedomy
NL
attibut has some sing values. Ths an be fued boy 3qptens
3
Co.3,
[o.33)
ot o catgoies Can be obtauned categoies-istane vasable
erdinal-enudey- atgones
[arcy L't oCEANS 'iNLAD, LAND, 'NEAR BAY
'NEAR-DEA
dhype objeit]
nearby lues moe Nulas than foo i fat vales,To
wyed. he ne att buts are
called duMMy atlsibutey. sukit- hean proud a Onetot Ereccly
laws to conuot categotal values nto one hot vectos.
tom toasn- peproesing inpost onetotEnuoder
>>> cat e d = One tot recclenl)
howing- cat lhot = at encodez. ft franafoo lhouing cat)
housing-cat- ihot
spavse mabi f type c' lavs 'nmpy- Hoat ty's
oith Ibsla stoyed
toxed elennt
eleent in
in comprened spane Row tornt
The cotput SaPy spase mati, istcad fa Nunty may.
Randomied Seanh
ohen the hypepaameto arh spae is lage , i is en
pfrablu to wse Rardomized Seanch, than grd Ceaoh
trstead ot'taying al pasible ombinaton, t. vauades a
t
ng od vandor Conbiratio» by welating ea rzndom value
aien ne
fos eah hypepanamto at woy tenon
appach has tw0 ma bonat
gou
o00
ttisapprDah oi ll enploe
-met.
You hane mose Contsol oes he orputng budlgct
wad fo alocate to yper pamt scach, sply by acbng
the no oh itenatons
3.
Code Snippeto, ottine the contapti inuoed in
() Meaning auray wsng CrOs-validaton
Ue Craws val- sa0e() tuncton to evaluat SGDdasif
mdel wng Ktold (us-valdaton, oith 34olds.
tom stléann. madel- pelutionimpost valore
cLAVal-oe Cs¡d- lf, tain, Ythain,s; cv= 3,
soing "aaay")
anay C Co. 96 3SS , 09345, 0.9st1S])
Bbove 43/ a y .
* clastes hat just clats ey gemage fn nots"
las:
trors skteasn. base imot Baseksimatos
las Nerengclsfiy CBaseEstimato):
dleB ttCselt, x,y none):
s
det.pedicdcselt ):
yetn npenos Cllenlx),i), dtype bool)
>>> nee) s_ Neey s claiffenl)
>>> ws Naoe Cnewes-d, -tan, ytoain-S,ou3,
aewnay")
shnply beeaus e
rb you away gues Ht images not s, you wl be
igat about g0- o7 time.
(o9 Conhusioo Maix
The tdlo is to cout u no oþthnes Imtaneof
las dasiped au das B.
fhorm sklean. madel seluion imçort (es awal-prolt
-toar, W>3):
TP+EN
Geikt- kesn potdes eenal tunthors to Bnmput
claiien metaies tnelding preusior and eeat!
skleann. ntrs tmport paeeisicnSo, eeall-coe
poeusibn-DOe Ly-tans train
D. 9o8 &D836s4666y
>>> weal- soe ly- bratn-5, ybrarnped)
D-TosSROe83604y
ors solearn.mebstes
ot4209b 20436633S
y-tban-md = xtain
y - t t mad z x_test.
the clate and make he mage clean :
tranng
knn.ut. tt Cx_toan_mod, ythanmed)
dean dgit knn ct-pxdit clx testmad Csomendo
plot dgrt (cleon digit)