0% found this document useful (0 votes)
2 views91 pages

ML + Python Basics

The document appears to be a collection of notes or a study guide related to Python programming, specifically focusing on data analysis and machine learning concepts. It includes topics such as libraries like NumPy and Pandas, various machine learning algorithms, data preprocessing techniques, and model deployment. The notes are fragmented and contain references to different methods and functions used in data analysis and machine learning.

Uploaded by

Miit Matlani
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
2 views91 pages

ML + Python Basics

The document appears to be a collection of notes or a study guide related to Python programming, specifically focusing on data analysis and machine learning concepts. It includes topics such as libraries like NumPy and Pandas, various machine learning algorithms, data preprocessing techniques, and model deployment. The notes are fragmented and contain references to different methods and functions used in data analysis and machine learning.

Uploaded by

Miit Matlani
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
(1 N DE X}— Name : Meh _Chayan ge | Std: Div Roll No : = Sub _ML-+ Python Pusies : School / College :————_____________ Isr | os 7 pal N | Date Title Ne al “| List 3 i 1 Luzi [set £oictionany 435 le Tples e Numpy 6-8 [ Pandas» 9-10) te etl aay M 12 t my 13-5) | EDA- enced ng / June. 6ak] Map dere Func. ote ot compre ndi00 74 = ist i Mera pPoAs leo | By t, 00: Th Poo (Riles vistE) 2) opbian Handling: 22-2! EDA SIE EDA Gs, Mulb Sqn 2 Hiskaganrn z-score, POF, CDF 265-27 Aincor Cost genchonldm)) , Convergence THEorkrs, 25-24 Represiod Craacheat Decent hyper hing} Ridge 2 fuss 0 Regression bo-|z2 MulF Tinea Regression 3B ols es (ile visit) sy Bias, Vonyance B4- Ri Adge Fee Re 2-134 Hype $5) ae ng [0-H MePcs [2 Revrmcy Recall, Precisiol, J Classificahal Confesion malsin—> Ebola t Placonc) 437545 s-Test, Chi Satore Tesh Arua, ae Koy is he ae orl Mulhelass % 4 ic oS He vic lass Loss! ae ad ney a Sigmoid unc. ey « gue i Precis is? Exopy 50 Thdornn tion Crerin 6) Cl Gui Tonpenity Be es | On romenical youi bles |e Scanned with CamScanner Sr. Re | Date | Title | Remark | fe f | [Roc QA Conve \64 [ | | KNemet Neighbos spouse” esse | Ehséabled Tangy, PIONS BesbRap Aggniga hon co | | Techaraves | ves vy ‘ ia ip ze 67 > Pag, ny | Randow forest | 69, "ace [Handing Pmbalanced Pal sef ‘4 1 E | | | Booshng | ADA Boost | 60-63 Lr | | Scclidean 2 Manhalmin O's Fance 63tc4 k Cush ) Par S Se K- mens Cusleriay Cvasuper veer 65 ~ - Elbo Method. vlostes cleckey [Pee | Heachical Cluskoing (nsvpowvised) | , Dendog ram ( Dist bet” point clsfeys) 6F L | SCOAN Conseparyised) jeg—| Densiby Basal Spatial Gusfering Appleation leith noise | Fo r mensional fe Thcomplele > | Bs 4 Peeesinsy Ps) 71 | MY Stercind Scab 7 f | Goss yalidaton Gv) P2-F2 + | | Bayes Theorem 1 Pe | | Naive Bage'’s (lassifier | 2S | | SVM Sppork Veckan Machine Csuperusea|y \7e-Pp I SVM Kenels 2 Hyper perame ky 29-lS0 Bo . f GnadienF Boosting Were | Boosting Poeurlo Alzonilhvm eek | ¢ XPOS Grackont Baosting (KG BOOST) | * Casson _( Classifieabiea) 84587 | \ \ Repressor CReg resi) -le1 | Hyee woraneke sr oy Boost CRY fe | | 1 ] [we jor Bat FS Scanned with CamScanner | Slantey : ET Programming 4 Kangepe = Filton mpbralose Dake Ancelyses [tail Feabaxe Engineering |e Expl Lena Dake Ay b Hendy’ Missiog Vales |e Handley Collars oe le €. Normuliserhion 2 igeho, vet Featuxe Se lechon I a. eae c- ee ahi | dl. Unvanake Selehe ce d Random Fors! Impsrkings Featvae Selechon Wilh derision Tie Vil Machive Bxeamny Abarilhins Répession aud Clasficahon lus Jenin. viell Zines hie Regression Decision thas Randem forest Yyboost, K pews, DBSCOAN aebies_hrysnilhen x. || Model Deploymenk fs 2 AWS, Azre , Gbogle Cloud Tent Prepmxessing byl 4- Tokenizahon, Zemmahzahieon Shp rel, Bigeate Tent Poe precessiny lvl = Bag wards TFIDE , Uniera Tal Pre pressing - Genism, Yon J 2ve nycodna. *Po Pegnaess Solse Nb, Use cases. | Model. Deployment ian Neti 2 spacy 7 Scanned with CamScanner | Basie. epenchions . fasta... shy 10 hen lynn f Ath ah ath asto b:2 zo os lo. 2 prerfesrmy iy _operabons waits Pe! saunie 7 Rt 4, vid no_5. Beslea vesighls + Tree 2 jlee 1 O° bool) -tunehen Shin. myst = ' Some _¢ bir uv Boolean $ foyical Ope rafters True Tare Tor fp > T T4@ PF 7 F T T To T= Scanned with CamScanner differen tikes. Bl tek: oo = Ast aa dab obchise oll Bal yeah, rienced seqvence 9 element. It 6. «- collechon of [Histiey = £7 Fill eith comme seproukll valves Append feed more ‘kr _lo the list. _Twe add [" tata" "late"? the coll ake a neskel Usf Insert 7 append al any inlen Makgo vant Enlenel wentend Ce, | This vo]l_ertend the list 2 nel ereuk a pated list as dene by append Pop I0_neMove 2. tw 254 | : | wont ey | it= C1, 1, 2,3,4] let. count Ci) 2 counts times | 1' was nepeuke inden 1) To_ find Phe inden ae) the clesined vy hee — Min 2 ran To Jind min 2 man _nesp- in the list Scanned with CamScanner 1A: an wrinedenail collechin pf olala Dab x * _Thoable, mokuble 9 [Link] cephek element. — [seks £1,2, 3,42 (ech + £" Avomne*, “ Amtman” "Choovan? | seta: 12,34, 38 . pred 25 £1250, 4% becuse noclepliates. I -| Sets donot tin x Dickonang ; This a collechon which is une hangeable £ indened Denohed by £2 but the brew Reys Pvales. ey [ke £ cond! Audi® "ano" Baw" “Con 3 Made’ here _Corldis Rey and Aedi ts velo Zeobpjor goiig tisoggl begs. ll form in dick* Paint Gr) don nit dich. saloes Paint Cas) oop _thragh boolh por —4 dick ikmsO.: paint Gu) Scanned with CamScanner re | Nes kel die. joncay Las €" ns": sas? | be £ "45g": 2000 c= § "254"; 2o02$ i. |_con hype» See ar My typle> C" Kena", “Ajay”, Tay") iny-hople *Co] =" Tosh" oe worll gia assigamend enor: bot we _con areplace Ihe enhise hype my ple ("Helle" "Bye" hi") ® Thus varll werk Ye can _chugge le whole list bet net a_style element Thonly has hoo in-bild porchisa tiple con tt) rple inclenl) Scanned with CamScanner _ oe | Nome. y ae i Hs A Nurpy is a_general purpes ern I} pasuides _ Lie ox. ofarnrauce Me py p-adah suche fat es In python fy hye raaun ome heohwce Ormags Dlink. while p invokes | rape db, ep oul. d Gahng ananiay. - LOAD = Np. anny C) chedsing shape Onn .shapet) demaahoua! - al:(1,2, 54. ar: [562 8) i np =2dbay (Ca,a2y) _fp_beshape. ba [sD axa fe) an [1] tt alo) anlon 5.2) 2-9 aaa £23) Scanned with CamScanner bulk Jonchous wa Sis Cr nang?. np orenugels, 10) pavay ( Cao J) Shep size Np -drraage CO, Le, 2) Lepesof 2 I ii) | Iingpece _-_/ creale eewea| division Dp has pace? te 60) | broadccohing 1, A ‘ ‘non OE 136 y3cz... ji) copy duachon > ley pmvet ae rol) anal 3: ) = leo osngath, | Thi’s_neplaces. all valence 3 ben Ww Aanags wae g_sefercace hype __________— ann (| 23, leg 100, 1 1oaD) n> | > carr lr 103: ] = coo ym IL Ara q7Cly2 2 S00 o Oy —_ C12 a Scanned with CamScanner or E0444 Fe yer ea Cu ve shold + 15 an. copy_] YD | Cadhoue! - Nal: 2 arn £2 onnag (tesa es) Vi) pone: Cbg, dlype x a Ppnpones( 4, types: ial) = npp-onesC (2,5) alhype inl) ViLd, Aaadom AP. nacdomd rind (3,3) pp_rardom. randd 4) shushed nssimal disbibeheer np-raadom: randiat (44) * giver inkgars P: Aduclown random. samplsl (1,1 ))_= Sebuas sendem Plenty vn | = . aie bio) (foe dringe — data = [pp.nerdom_nonextl_Co, st ge . 1-0): plt- ben plot Gata 2 ; forste ia Benge (1 4)) Pape 0.217. Scanned with CamScanner “1 Pandas. ’ | __|dt es an_epen.seunce,,B5D-lcensed Iibrare prouccling __ thigh. p J eriraance Eas bb use dake -shechuses and dike pig Pe, # and de — analysis tools Jos Bylhon programa bung | , | eal 0 dele eens pA Dalufreme € B) Shot + Tab Conod Dec a | dj: pd Doda Frame 0) dj. to csv ("Test 1.<5¥") fess ele naka slocL** — —_ | A tepeL Row | Dak Frame is — aecombinalion Q/ many columns Lohile chia Seri is_ ayy [Link] 4 colemn I Bikiracnes can be converted tutle_camys: e oy. ile (2, VIivalaes Difrene bekoven loo Libe si lee _uses _seu/column nom bog sohi leaden ing Scanned with CamScanner [¢ heching Ol coelitons — _2 4). innlIC) con OJ “Value _covnds - AJC color name ‘L. vale. com) oS _! To cheek um que va lees. Fe Chelona nome J. onique0 on — Read awcw Jule _ m : 4 «pl ead-csvl' Jile-ranewcey') > *¢P "change sepesaket Same Ofherlunchons. et ci gel : Af info —__— Tian + |Al-dlesonbeO__>_2nly_ flea bpl £ inbgpenssill be Keni, — + | Coretitional daplay 5 ER Pt sane Aj Ld £'g'I> 109] 9 y 5 Colomn nae Lo _____lo2_is _vake Wout Tomake Ast rolemn_e/_csu Hhe_deh coleman a/dbita. prome Use- pas read csul' sb, inden. colze) P ths is Me cokran nomad tole made the . To : tadeu chin need cs Co. wv tudewcol > Fels) —1 | To we onl Y Se eg) geal sd) Scanned with CamScanner ¥_Matplet hi dss To. a Jala in 20.30. digg —y tate base Iibrapy be nompy pork malplet lib. papel 2s pit ile ig Ye-rml pl hb inlinge by ony Bs weyline go ccbal ham | = je fe nite. plt show) it wil} —_—4 thine ty shoes plot + pit. seater pit: plot . plt- plot (my, gx!) pit - savely . a plt_title(! ) - plt- lake) C' 1) Colon L lyfe ste ghbel y . I lo} a2 f | as bplt@* 2) In 002 amas 0 Canshoc mlhple | pl. abhi 2 plots —— | — ‘| | a3 zy. wlrer TL fee) | posi bond! pilban <= _ baw» plot : —pltshist he logenea nthe set bins. dor ep ap: 26 bad —~plk-bst@) JT ——4 lL — i [+ = | a ze ye 60 8 qo Scanned with CamScanner By Jeet ihe 6 “phe a eee ee 0 _eapyl ‘ee lincgl ~Heb_ste lies _. Benpleds help »_ bo dfinel_pencentie—— poo—percenhile- pit. ben plot —percenh-le— |__-= s0péncenhi 25—percenh'-— | ae ° s oe ethers. a | ple ben le al _pakh. exhst = Falez) | On te bow wail) vio: l - vy be colorel O) vent = Felee XN makes hesy36u ha ._plt pie —? _Piechnls: ples Scanned with CamScanner __*_| Seabona _—___impont __seabern es _sas 7 deilong cS a — ——| 4. tt —riveciant analys digs —___biserenteimbygg | Te tase ef mane than 2 deahaes, purphls are prejuct t 4: SP8:_leaddetaset ("tes") & inbuilt dale get _@melabon Be pce gf laltiy a chhinalyr cmecn __behacen tooo mere tings OR jnkoselabon ship behseen feubmes Tofu BIE: | Tn_is applicable te poin) onl 1 ke ret cakgonic le Peanson Correlahine ; : . Ie neas. H : the oben decreas Consalation in impobunt don Jeatxo Skehion _ Hl eS Scanned with CamScanner = e | goint pod De “edd da a vanaysn * ICL] jw) Coabneoyeahores - 4 ign ploy Lt shal bill cule -d). [ki ined>! Dey This will make q_ney2&h07- a oft besh-di + line te the —— Jeihire graph 7 Pain plot 1s. painplet Cy) @ Anthen 2 be coidor calegonncal val 5 by Joy coc. ain plot CA hues ben!) Dist plot Zt _he|ps— you bp -Orca “ake hiskeosa 2 in cubowa ns. distptot( A) C' he’) kde >Thye Rene! deasity ashinet tise pet ie ne ce hing Scanned with CamScanner * Catagonica Jeakn loon tpt s a __$ns - couniplot Cen "dade eef) sheen 4 | epapoau Inhion toheyenk) scout plol C4 >'sen!, etka =d/) “| Bor plot | eimiben fo cal bot here we ie loyive bott, aby vale 05 banploi n= y= hkl bill! dake =4/) __ Bou plot bon elt C'smoker, ‘tole! bill” dale ody) Is * palieHe = "dain bos ') I n l colon of fi Tag I . LOmentsy') _,-hue + ‘smoker’ ) Veiolin plot —Unile Violin plo) helps us see both the dh buhon of late in Koms_g) kernal density and the bonplot — | Reval | re page y > ST Dap Null value Sts eat one (train. isovll)) Scanned with CamScanner | One -hof eacedligy is dex naninal venbles label Cacoding ¥5 Jo ediaal vanibles [F LEA = Ast handle themissing- Walich Ihe ggg le. hee b 2nd go ave handle eo _cabggerica/ ftaleres—— Fealune selehion | “nominal veri bles —are-cakege al_vanibles which hase —— _@ hee ene more _cahgaries +01 Frou! 2gy—hi order " Paclinal vanible ore calgonical voribkes—jorF phic Lhe $$ poscible_values_axe_al ordered. Sexbann 2 [Link] shyle Chile grid’) e. de) impleage cols). : cals £0) Blass colsl:) lligg denchoa use «ppl tounl'dge') +taain LC'rye" 'Pelass') ]. apply Cooapete age, cuss Propping cola Hai? pC teabin’, anys | inpleae* fase) tain crop na _Cinplace = tase). Scanned with CamScanner fixe re : Tp ae ane usinysome_line_9/-cocle_rvlhale_ hinge belles Ie Puke a denchioref it and then use it. —AAerence bekveen paint Prekan L Fox_enample se > dle) pelle Os =e hellocs 7 | paint Helle. szorld") —_aelrn "Hello contd" _helle O. = _helloe _ Hello sssald Hello .2041d >. val_= hello c) = vel> hellac > print Leal) => prrat Cval) __Nene He llo_erle 0095 ~ orgumen bs WD - dewkd as Day ia _kwarygs = Renalve omemens _** > denoledl as J _KN | i | 4 Map Jeachion tide} even orodd lrymads ; tf nem ‘2 = = i Sehna “ thenmber {3 is Suen afore} (nem) ele. are lon" The nundey $4 is Ode“, Josmat (nam) 26 On odd £ ) Bene is_ Su 2h fi 2345, 47,6 4 26 See] ~ diet thi | B_taese vee will have fo ituwk rey | The lok py a bop. pM denchion shee. mar shre in leggy Way dunclon iMena ble shift xbb Pap (een oh. od) Ist) list (map (een on-ocb), Ist) Scanned with CamScanner Lambada Fonchon — - —_ ms 13 an anonymous. Junchin A Jen chon 310 name TY we have a ke_erpsession ina junchou nee ey. _ de) addi bien (4. 4)2 nekan «rh dd pron ( 4,5) 4 yan ble jnpel PAPE addifion > lambda a, 2 arb | avert it ile a_leenbeler donchi aI 5 a 3 adel Hon ( Iu, 12) 2 + || Filter Junchoo in pylon: 3) de} even Crum): ** if num % 22 20 ! ae ly, Tne > let? £4 234.56 4 of Il ditler( even, Ist) _jendhinn iHerable Cacakes an opp object Tl Ned (filler (even, Ist)) L244 2) jelker ( lambela pum: pumfor:0=0, bt) Oe hS ern rec) 2 lest (fille Clana bela numa: num % 2+20 kt)) C246 Po) 2) dak C pied rey (tam bd nur: nemFor2=2o, St) ( fake Tave, file true, False Tove Fale Toe ,fibe fave | 12th Trse valve ¥ J tap applies lolae_enbine List, Jiller appli vale Scanned with CamScanner ——— | | (abe _Aist Compehension TA provides a conbise way bo creak lik as : tonsils al boacke &_consishay ae—enpressioa dollowed by 4 lor clause -then_ger o_a7_mere oro y cl ——| €npaessiorcan_be anything meaning one cn Petia all | Binds ef ebjeck in alk. } | Enample 3 bha=cj a >t def Ish. Seysane C3”. gon_i_in_lst: [std - append Ci") 7 delunnlsha Abt eqpore (C1234) LY dep Bid) sso there i ai — Al ictt = ft %34J 9 Ci" fon iin bt) £ Is! compack ensia “Sperahion— Ct, 44] =| Gr; fo_i_ia Isp iy i% 22:0] C4, 16] ¥ | Sting dormabay in byl —2|_ de, i bn a ———_fekon __" Welcome £3 $7" ol Scanned with CamScanner Fists oe ifexble Pai ts Fon emample | Ist: £123.46, 5) 2 || Jor j_ta is}: Paint (i) 1 ~ 7 3 - + | leo This Junchion will convert 2 Jist ito com itera Iye Ast cee all valves cor clinechy assiyned be memmery . One 20 call mento Jeathon, Only then ej 4 ib will be incheliged in My sremraey fon erecting le | bot + C1234) P| iker (eb Z fis), jherales at onrzese menesy becobre 7 ard nent (Ist) A > rent (ket) z 2) nent list) ie only when neat l) Junchon is culled The vale voll be shred sa the “albcakd ven oe Scanned with CamScanner (ee _ (CLD @) 4, Fydorest- hay import Of all Pelton deske Sciene® ibrar || impmt the libraay when a diuchon isused. og dj pd.n rank, _achve imparts OC) iP ssiMenhomalag will Shoes all he impos kd Nbr es ty POF pucks ! PIP install PyJores } Jot -22 ky ¥ ORS in py thon Cons brictor = fe inisialize how mony proparhes one wed tr class eielags egy == inih_~ " class Cor = de) _--init (self, ick, coon, Signe hype): AL). Pirdosrs = sindout el) desrs + deo [Sell engine bye Say neta ewindes, Stodean, 1d CF vsepne tass-t's-ceHed—|— t --mikLO agua nur Ans by dea tt | Cont > ca (4,5, “pebeD fo (ama _ a l U Neve self 6 peinking the croaked ohyedt Cert) 0G isco poHled = —! de) coll doivin selunn “This 15 4 $9 car" adonemd (sel) -eyyine bye) —§ 2) Con |. sel) - driving) This is 4 petrol car" ft (So Scanned with CamScanner ! Exeephion Heard re What_is tre aly lene bekseen an error and an encephon 2 Dp ae Ang An_en303_¥6 —o_ problem ina _pragsom dee te ——_Lwhib te _ Progam will sloplhe en ecuhon. Where Las an_encephion 3 aniseed hey some mks nal event — —happens hie b s he _nermal plow of ie ggan An_enton might indicake Criheal problems toate Aesonable appleahon shold NOT bry 0 cakes An encephon naught iodi 4 cendihiens hich on applicahen should ky tocaleh. : a aay: ay _ _ neh tte code boR hoe enBephon coun Occur ence: gs eee prialC gone problem has ocened') aq -26 44S Pe et a o \s lemncept Encerhon Pa : = 2 pacak (er) re . ae S Peraul, class ctlcases lest. . Encept Nene Eason! “ a pris 4 C Toe user hes not defined kre vesbh” cS - _ehe: parti ) B fsy ehe 2 finals ually blo kk wot I] aloes be ror Scanned with CamScanner “® ¥___Coslern encephion nattion: pf class Eaner (En eephen): | PSs class deb Emeephon (Earer)2 = ~Poss. _ x __geor int Linge C Saber yeonel bint“) age 2072 —y eur a] age £230 4¥e >70 | _pniot ( The_age £3 is vahd. You can app fyder Ihe erate.’ Joyner | naise dob § Exsepltan —enseptdobimerehon | pain C The aye x_n valdl —h gppour gor Ine enum’) | Pylon ORS 4 Pobliec, Prokeckd 2 Prive 1x ft 27 clus cor (): del ist. Lsel, vitder. deans, ey lee Typed self sdours » Vixdo Ms dogas _. deo puble_?- Hengne pe ~ Lay ndjae sel). ewitdous = i si edeans ~ seine Ty pet Paiehe 7? fea sel} = inchoas * — - dors > Scanned with CamScanner EDA — — + Univontant: Givonnat L 2 Mellivariant Analy — Unwanian t Ana_lysi 7 —fo2_enample igh pe Kw aol af Sling git ‘ od Gao ep SE alge wa ene F neyht Biscniant 24 heght Lr2zh3 a typlt Bony way . a - = —st peaks ad 5p ~ | TF) thee ete mucha} oventp in poinks 2e canto} ase bogie fe. Regnessi¢g Vulbunin) nse 4 | _age height weigh} v = ay - ve ful_op- = = dindsy =, cone [Link]. heeght J | wergal] Scanned with CamScanner densi hy Zouk 1 ae Fsbegamns_in EDA a ae i _4 7 The bell convey alled probably i iy. density Jeachon __| PDF. lo, ; L/ a Zo Go toda abe] [so ths says That it is about p% enisedint aveelysis ¥ POF The @Qnhae fin chew What perseniage @) The popslation are present at exh and eveny poiat | Kennal Densify Eskimalar or kele shieh trsed tp dcreale the pd) io the hish,ran | ¥_ | 2-ccorxe_Siahish: in_the 464 shoudl dicho 68% & Hehe Mere is cocnd & of por Sealy Graussjaq normal Tn Sre_second sktadard duinbon ee have B eraind 16% gf con dela Tn The Tad porceukge we hine ound Hache H te ae 41.7% @f Vhe dete nN Ce This & Ihe em Pei ‘Bi fom-le Staulerd Normal Disb bubiag (SnD) H=o Q@ © =a To convent the Gaus ian # Normal te Speurckad Nesrrnel ; Zscone = Hi - = a te Scanned with CamScanner Braden s she lemen 1 __ Ghussiay NoRMAL qajind fhe. probabilify Jon 760 se will be | The 2-sa€ gives. hp vere fen the ple} hand side | Z-dable vill : Dividing info pals Give This f ©: O\ vale “yA } \ > L Z-bcone S44 That if you know the Shunderd diction je — Lihtheis case id jo - 15 atoag. goornthe mean io ¥)) £ able bw get fhe @ Aeegion eter Yale a @ * 2066 Scanned with CamScanner || 7 ore | (LI 1) @) | Tn Stendard Nosiral Dstsibuhen (sup) we Anos tal Be both sides have eqpal dishi busen. = _ ie 0:0-=0 _— ere thom the z-score lilale vo knoe trut @) is 0-088 | 1 e"@ bit cccopi$e_b68 Yo ee Se O occupins 60) L joo: *) + 6-69 +50 O_* 446% | Pr(mr60) + 120 - (50 +444) H ace aby, # | Gauleh e Density Funchion Cenp) As the name soggeche ‘commlahive” Jon erample , Myx is 4 Paobubihhy Dewsify Fachon (PDE) Jor weg hf, - ¢ ott pet 2 cor So _fhis mens Prat i ¥ arcond Joh, 9 De " PDF dak: is les Ten — on 4-- \ \ 130 Bs || FE — 70S 90 won ID ug Scanned with CamScanner [ x Kinean Regression Malhs A Net eglt Menten oy = f= mnt c_ Best it Wye aes et M= Slope. € = in hercept Cy howe prices Pave a 1000 108 Size" may Yi ___Wheu_sije ie n=0 Pamnrc Lgte. mi talk fe change in them came thal eill pe Fg chang Fath g scmis —— Dro rrsthple jines Prwhich ever hoe gives Whe__minirom ennor_a_mini mune Me _ su monrvahou yf Gonar_ts_gotey ple evr bes! Yi) linn 7 But valve twill give me_im' £'e The_diskince birkueen the best Ji) point aac! the real pot Shovld be minimal ” lst Funchon »_1 % (gg) | 2m ia a gy manse yy - The eal points m- lok qo. 9) pain wnt jo Py any Scanned with CamScanner esp > ve Gemma contidoring cc co oo yemn b reduce ¢ compos b yo — frm by cone) derig 2 age ae et cont Jones 2 Le x a aes - . = [orc to)eCs. sf Cost Jonctisn ze a . ous JQ i: ing m2POS | cost n= 2 [es- yy CR ci- Dy ry —teaiw 7 ery | fen x OF ; TA seileoly de> torent mvalg [ a | A iN ns 2 Y=. \ | Global minimum \ q Slope will oper Yise get Ie malic _hene fet meds we have bn move clocsn wards . | Gn: engence Iheoneen, slope-at Haat point ie olden age Leon tile rulhpleah. R= Shep eige_ohic. should_be small l jhe countoun ple as the nage Ts be chep Psmall Ure hike bey & a ‘P Scanned with CamScanner Bias Z varia [fF _tt i) 1 - ee a as on = =o shal | Ridge 9- Lasso Be Reg ression _2™me_negelan £3 hunny nic T Sei. a hypen hoigg teh et I 7 Tact alaber P Enpereace in yaors [ Suppose we _anly have 2 poink 1 Peale We rill make the best get line pa Heth nog hr those Bit_the beet dlaka could have som olber dal Oren jittng | Wife sesped lp Me Muinigy_clalasel goo are yellag la deus _emor_bt wrt te lest cake set we we getting an highemon tha wat jo fran: wey thigh omen and p> Jeo we ane gelling high exes Using Ridye Q)acso Whe cg _comven F_the Dven)iting ie high vonince ow Vo inge z A good medlel should always have low bias 2 low vomace. : 11s cahk dale mode} Scanned with CamScanner Ridge Reyrssion — I Jy: ee, nepession 7 WE ere paiatrazing fhe Residuals _/ Lost ponchos yy» mane “which 6 ae by 2G -p “ we and we were | rn sag Tis |e idge Regressiom we » oil ad) more elaSeless 20- “9 t » Glope)” BK Rive Tn aidge we will }yy jo nedwe Vhis enhre Pring > can Be ar ug Hn, Gael pwey| a can “be yebe high slope ee ss ¢ 4) a Ser d=] eA i Tn tis case Cost dunt. (1) 5 0 L 4 i Ridge DO + Ax crs x coud hme BOT ET slepe asia a > 164 Ridg Dsmalleq] +A x Cort val) = somee val may d 1.34 Here _woe ee peralsing Jealnes waite higher slope fh . 1 [fu Pep ing bo neduce the ah lope 4 we he. mol kple fea ha % = mat mw t € Ajo mulhple iHenahons we will get a new best git hae Scanned with CamScanner see 5 The maia ai of Ridge nag session 18 bp_ne: rengifing. e —_ -Laussa Regne ion. - Lasse Regression nol only he] Ies_05_foconb MEd iting bot also helps os to de Jeahac selechon £ (G-g) +” Islope! my mbode ef slope ere Suppese we have melhple feaknes Fos, Cg 4 2 run, XVM, T P94 My TH Me, TG o ug) td * | try rm, +m } 2 Gah Farm Here Pwhene the slope alues Vat are _ veyyvery less, thos eqhaes will be removed ie these” Jeabvacs ane not important Jor pocdeching abest J it line This_in tenn helps uc bb do Se. Jeatune slechan. for multiple Jealvne , Tn case af. Ridge Req i. Glepe)” a) [he sloge vales will ghniak hile in_Jyose je lslopel Bree! some of the skpe va loge (not impon tnt |eatuses) vil) become 2@ne- Scanned with CamScanner ~al Mulhyole Ainean Repression. I Rem ml Simple. Linen Repression Pane = ad a a eee Paro 7 Price = Bo t PSize ~ \ ike ; slope o> iz 552 ce 06fiarenh vrs | Mlbple = __uthple ea hin i gi! oe Ja ds. 3. rember a) ocality price | bedrooms | Lys Bot Bin, + B,%, t Boe | ¥ IR sone aaa he a om of resideal » | ~ Bs (g-9) 7 Sana_9/ mean Mn" lg 5)” isn g . —- aleays Jue, f: predickd vak anil Sumo} pean Sum of. gimme af vals T residual TI Youn_modle! is —SoThis_yalve oll com e SPe lif the models goo: pus — lt senell_ty + 0-8 b 0-48 — Sy R* scare valve vill be the ace ray 4 how close we wise, Scanned with CamScanner -# —_Mthicolneanity 0 — O88: Ondinony Keast Sapone mine Regatss oy —r — at GY: Pot Bn, +B t Ary | TV Neespuper radio 7 | Po cant_be lef emply = Ths dilhing it wilh ones Ke En «elle ivlanbG) _ mode|= em-o15 (gy, x) Jit ——— = etal, inkpuk node. su moran O) = ¥ Piss Pvanence — rt | brain dale Lean [Link] = zy High bias x” High Naniance a degree of Fine © we Polynomials YVrderscttag ‘we “4 : 22 foo Bin * fow Voniane_ Frgune @ »/—_Degsee ql polyromial=@ Dye xo | xX = Figure @) K demeo ol foo Bas 7 polyroeral oh High Vaniance A Overdi Hing Scanned with CamScanner xy —O_dussificahon Bias: the exron_p) the raining dba _Nanance: The ener ef the tel dake | ede | Medel 2 [Model 2 | Moclols _ Thainine_ener J. | 25% | 40% 7 | Tes bingy erv0y 20a 75% 210%, dow Bigs. | ALT Gas | aus Bo | sk High Vaarance | te ee | Overd Hing Under] Hing | General Repnesen tution of Bias 2 \ontance q enn. | oT yo ty @ Fiy @) DAnatning enor x < x @ Teshng error \ CV_ernen (Cre: ke y validalion error) bras Loy generalised how Ts ‘ modtet : p-slagree af polyns —__| Ofhe, eramp kes > 0 | decision Tree Th eplisk bcotplele dept on buinclah ls givisy Lao Bias £ Tt lakes all feclenes Dskonls spliffiny le compleke Nigh Ven iene 5A splilliny comple. a lan ( & elep% Ths to tsk ys SCN L Hence Téthiques like _OvenJi Hing ___ vo -—— Peiston_firttning, te onal ho | wh Ra comey ——— tep Pe high vorince lo low variance There ane often bype parame he tenay Kehn iwes Scanned with CamScanner deh ee O)|| Random Fonecf \) ot At | Hene wwe use mul hple_dleciston hee _in_ pane Mel Siuce vse ene Using mol hple cleanon Been pwrallel, _inchally we get the sename 9 > Low Bias 4 we Hy Vaniance This will be The proper’y wr. teach ancl every elec'ston bee these ele cision Kees ia Butsince we ene combining ll be conver teed_}o the hig h veyignce . vol ponallel Low variance - This is _also_called Bootebap Aggriyahon. Jn Mhis_ce_la aduke set and give i} be molAple modelsrie we dont give all he seronds, we y ie nem bial _neconds ie some 'n'amounka/ dat be some Gach rede! [decision treme 2 gdinally geb te ovhet ——— | and the n we aggregate it 1-€. “Suppose_mang models nsier as ‘A. gave dns 2er__a¢ ‘4? then we lake Thea Ty many moclels pet e_answor a5 0° we kike fhe answer as O.- “a oO ee Scanned with CamScanner p33 seal Y Reguored and Adis Raina, 3 lo a Tre sspemsed al. problem 22 mastly. wet 2 Rind ay thse tases ie Classiicatinn 2 Regsesabn Am ___ fon Classijicabio.n | wahen ever we necd to ind accunacy, we J aalloetechaiepes Hams like => _confesio: became oa Accuracy _scon TAve posxhve nak ll Reallvalee po Ppristneiva We Fa scon. : [Te Ripetsin peblems., ae check accanagy ys 2 Recysned L£ 2 Adgusled R seyored : LR’ 1- SSnes.'2 I= sume) Resideal | SS total Sum 9) average ble! Ibammel rea sup £6g-9)* Gane he predichions \ bly ~G)” Gore the xhea/ og valoes By this pel anva which is bekweon OF A the _mere_neores the valves close jp, the beHer he }__ meclel © Some ines vse do get or Ras les Phan 0. This happtas ~when_ouh best Jit hne & eee fen Pate th axcnagel mean dittine (ve suma fokI Gather: Ine Euclemes to Reject em capt net Reject) le —_ Ln vll hypothesis. siti yb a Se eet ——— Ho _(null_hgpoltesis) i Hy ( Alleraake bypoliests) | Confasion mabrin Ho Hy Doe rot neyect on | PS ber | Fi Type A ok | Regect ror _| We aefect th pel hy palhesss. of pdvaloe 4026 sign YY icance Jacten __— Qalphala) . P Valve 0°28 means P5% Of 4 he tree ¢ wa Thos 2 betel est Scanned with CamScanner zet a p08 This means —atiys nee Ins en periment _100 hime. = ee _will touch hat ance tg limes. Pevaloe. “This the _paobabilify Jonthe null bypoftesis fo be A - it kh y-Saime 0 eaprt() —jPwe Cah _hypalhesis it heats ever [hing Cg Goin» fain coin Le JY we tess d I Ae fe — 50 himes dain nabere t should a These. Hoe = The coin_is Jan H,_ > The coin is not Jam 3 jo, and Me vale est 25k, A ee hs segion then ae 2 30 40 50,0 76 5 voi I nege £ he ned) Stenonnl livin ea a ee P2005 > sj Scanned with CamScanner Tra dabso} deren — [Ty there_is_onfy 4-2. eabagoriew!deabne eq ____ ater f we use One sample pruponten Test TY we have 2. cal ppsicalgleabnes Phen we use _ Chi Sqwore Test LT) we have A tonkiniow sonablefeakse then we j | ovate wlstast J) we hense 2_conbiniews vanibles jJeukass Then we check come lahon_. then F lest When we have A numerical/conhaios vorible ana 7 catugonical verible with only 2 calygories then we ___ vse__T-test Wh Gendey eg 3 Saeales ¢ 2e i ~ yo When we have bole cn fiasous 9 calagorical J ealvses and rel calageenical d eal Se hus %mone Man 2 calgon ies, we vs aAnova Test Gye grou child ——| ier! 20 r adult victenty 3 OF \ Hene when pxalue /si nificmce yale| Balanced dake sot - Fon_enampke._in ovtput_we_have Soege: 2 G00 pos 25. 6-507 &/ E fe yes 9. 400 10 2) @y-boy. [ 700 yas 230090» Zy.-30) This bind a) dal set joc babuced deebuce! BI this case __we_vse_Accvray be Tro walance_derted cel Fon enample: if The ovlpils wene fee 2s 2001 _the Same models could get biased tpwards he caler velee which is €ooyes- In fis _case we t nsider Aasccuragy We consider = Recall ( Tue t ve <9) Pression’ tve Pred val) E Belr. (Fa ‘scone Gon Jusien Dabin. Consiclen ing ve have bina Tisa_mahin ig which we have fhe aéal yalees on Me Columns 2 the vales predeckd by ovr model on te A025 to seal val Moidol Te | [tet ype 1 emer > FPR false te Preds olF n | pate Ce Tyee ZL ench joo oe Tale _-ve Kate es Scanned with CamScanner bn In ay classjficahon pochlem Bed be _b sedece_ovr Tyee 2 Ty pe2 erhdd., FPR: _ FP Fe +N Arconacy = TP+ IN TP +4 FP FN+IN This ts Jer haln ced! dale sol XP Benese concider J we have 400ges £ WP ne The model will be de biased fp wands 62 ges _______ Theos [P= 400 £ TN = 102 Zz Acoonagy > tooo = 49% which snot 1000 night So_in Thus case_voe will _b osing Recall Presi ion LF I score. Recall 2 PaeSision Conjusion ma hin a0 pe ete L dfn [784 Re call 07 Thue positive tale_en Sensibivily - e Trt —N | Ot ef the biel chal -ve_vales how m 45 aid Bwe achally paedict pesitvele/ @rnechy, Scanned with CamScanner tL ae. of the Tokul_, psedeckd_pasihive result, bro hoes may _Paccision TP tre | esulb wm achal_, (Posie ne eee Resitive predickon vake_( Arolke rolhe ame Jor precision) This__ig_Jor Ei helene Deer: Yt bused_on_problernshikeme} af Ho | oe TH 24 Y When ovr FP ch_ rao. on {hen aaa P is mw one_imponkwuat., bli ind dy ese Precisiay — Mwhea_aun FN_is much mere _impertin} vee Recal 2g Sfaurn det. FP.s imp, cancoren not _FN is more im). | Ty some cases Pots _fPL FN ore_imporkint hen we will hwe b consilen both recall 2 prcasion tc ia _this_case we will vse he _F-bekeCFd scone). x FA sere 3 Foz (ite om «Precision » Real) —___| ps Presny t Reel) we _tnibolly need) b select p When Poa - FA cne vale 20:5 — Fes gor R22 - F2 seem YPet 2 Fs 2 x Precio x Recalp Precision t Reccll = Harmonie Mean = Bay | my L Whee FR LEN bel ge _in hunt we se lect A=d Wht FP > FN ie Type2 ere Shen we ne duce the 8 vale a ¢ R 05 CH40 E ‘ ae A increase Pp _ TTF valyé _b. tos eA Bo 2l Scanned with CamScanner Loyishe Repression ___~ Binary Classif icachion p — best_fit-lae— Ag fea lS so ging high ~ — \ QUYOA SO : we dent ose liner Gemma hOG) = Oo + 7% Repression in 2 Pot fit lessifiahor 2 olarb : an é We we siymeid ee Kine Rey is not bhe ased o> classi) iedon— points) S there ane many cut berry 1 The best Jit ine dewiates _— pomp. giving hry In the Ast diag. the enon fanket fhe _a-anis in td wse_the_valee 1s mane [hon A_civaikealy fee sill be pon — where fhe vale 15 less fay 0. fe avoid [his xe | use have fo vse sigmeid Jenchin, Scanned with CamScanner HK dopishe Repession _ _ | _Mattemearbical_Instui bon © Geome he nshiion - ~ a debe pode —_ & Plane ig rhe oe Y=Bor A got We> +1 et o o9 Logishie Regyesive i applied » « problem shkment when | the bie poinks are 0 lax © the Zl oys: R eck Yel Ua co (gy, * ta] ase @ Since ~(-1) 2 tye Yg=-) vr 2%» Rypbtly Cass diet fis*.5[<0 Se a. Loneryly eae Scanned with CamScanner en on (eae cman 2 y, om, =o (,_@ Ai or a | [be Monitim bane cose OL one Ri?! ily classified — |B which is _+ve_ £ GIO ene onens by ¢ [essified =e Thue vo eenceed ovr loss Jonchion_fo_be_+¥¢—— Thus __manivnum. tas ae ony poacher Lt Tn this yf _ane_ given. Er? = wofehds * ee Awe tp be ypdee Ad oles 2 unbillize_ ane ge lag [be_ma nim sf fre sommakon Tat por heelal » wegzh will be the best jit lat poectty lass fies Mme poin's [ifhems axe msg bed twas meet fe Sjapneidl dune_is_va b_praent Mee ovbhers, — ____— p_the cast/ los Junchon_bewm 2 Ime 4; Guim) z:giery igo L+e7 between O22 +41 dy —docg frat it pemmes fhe effed of wie — ‘5 ——. Sve Oe Scanned with CamScanner of o.. Anes update aby herds o: a s CS ey ed pany HO55= 453-24 42 Qo J see ES hich & rng | prevent This ovtlien problem Siyereid Junchon és este | | Sigmoid_durckon scales down al! poi bekween 02 4 lethes | polly ding Fre_¢ 2 i ¥ | Loyishe Regression CMolhiclass class} ication Problem) | Cone us Rest [orl One vs Al) Tut 36. alee Ts ns = me \ e Teo | oF aaa Be sppo oo DH Le | vege ° 2 : as sas Oma, » DB model? mz Pareles 7 7 Dining couding we hue to sel mo)Kekess ab ov. a Scanned with CamScanner \ L . I 4 Ealbegy- he he conshs wching | a Decision I Tole =a the Best alike amogp! Ihe Jachases { We vse enbeopy ai, ge ge Js 0 ok | : yes LL nm) @ . 7 Go 6 S _ a Thus eabapy is vsed Es agin rocles slaty aatbsbiles are cbasen Tren The $ piiting process it tek ee a Leos 5 eke) nt time fhrus inc eeiny s—— The paccensiag Pine _¥_ Enbopy hel ps ws bp meas To, Pririty @-he eo gplitd | whas. or _enbepy helps bo calcukide the po ® af subst, “Enhopy HG) 2B lay, (P:) = fey log, (P-) |B % o) We class Tye /5 70 Pe see ave clas: Ih | Sac ve: - (2) lay, Bo) = ChE) A Re | sk [Link] bits do do Simi berly Jo Ja pro ye 2 4 | ea nels 1b tn bo —_¥__Gomple hel # plit welen Ze 3n0 | Hee Eotrpy will aloage be 14,4 Tf se hue 4¥es 2 0 Avoid Tus es = Salo will be Ont zl ct! om 2) a / Scanned with CamScanner lesmation Gain sel oer ot ys Tis mpc ks eat Bhat % geod onbopy yale Grom ko | beotiom gr fe decision, hee 5 Enbropy till fhe leaf nede we vse Aifororhon Gan. | Th combines all Ihe _enbepys bygalhen_daom lep te |_hetlom Tet BF | Gain (3,0) = Hes) - 2 [sv], Hes) i VEVALS ls) mple_of the S- the subset Croke! subset) Sy=_ The sebsed a) fon splitting HG) - Sn brepy of Ie subset 4/5 eg HG)= om én . SYBN HY,) 2 091 Hljs)? 2 } Smeahen Gan (5h) v AO) = Gombon) HG) ~ a HGr) = Me MGs) = od- BG yom - 6 a4 14 14 sees] - WE can also de ee Gp The bighect iglowmehen Sain vale Weill be esse) . The hishes He internation gain Met porticcky Hee vill be chosen Scanned with CamScanner | | Dukaview qpashos , | ea bropy vs Gini Zpoly | i Impurity in Decision Dee | Both Gini Impurity 2 Enbupy elo the sarme lsh | te fe measine Me_peniby_e) put Bot Gini Imperily is bole. Because GL is Jeaker(conpehtien i 4 G Gi clecsnf in be wise) than Enbepy - £ bres Entorgy has Fon _euhopy 02 Enbopy 4 Pay / enbep -_ 3/30 af Gy | | : (3% VY (HG) af Zee) rach oP. 63. ! fy ? When split is So% ~ 55% je 37/3N thea exbops is 4 » | Gini Impunity = a - EO) im (@D -2-4[@*+ox) Guy = a-[ (%)*+ (%)*) 2 1- (02% + 0-25) ~ os o=t > fabrpy mae yo NY Op. os 1 Pe To_Gl_rman yale vill befo5] 2b % Extsepy eae vale will be [a7 Scanned with CamScanner | Decision Tree. xl £ yor ngermei al_y plies | aa Fes, di ole rs © Sonny all The wales ~ mM 23 y @ Thaesh hob) value ey boas 7 , Yan 4 N N; 223 a Leen! s %>w oh ES a Pa x Ca rw Ee ue Zed) node — x Neat Th 3-6 A Then Th =4 Diésadsankygeor pmo WL [1 4H Time omupleni ty 238 >3-¢ b huge ie considering ee Van Lal) uct bes sPshalde Suppese there one All vate! var bevscensiclned as mi lho 9) valves. Theshold 0 en hops 2 In) jas Gain will be caleclaled Je mbleA_D all decision hoes The _one_with he best Jnjormeah Le Xy Boost, Random gain will be chesen Fetest where inlernal decision Dees ne ved 2 we have mayy jethres, tf wll ake mene hme ines tsaaoin Sth hime compkmity vai ll ingcase 2 inpe& incase Scanned with CamScanner Roce Aue cue _ | cons dered os 4. 29 Typesheld yales L' 0,07, O46, 6-6, 0:7, J : Co} gislo va g frrbs_ a _ This is vsed 4” _ bina c lassificahon_probkres _ we ve Thi b sot vail) Thyeshdl valve - oo by Aefault_in Lo aight. Regression, 7, 0-8 —S— $$ So TAR TP d ; TP+ FN 7 of OP! Oo Beqpeenl a7 _fPR=_FF. 1 FP+TN | 604 : —— to oo3 tt 5 _ oO CH ! oO oo 1 oF ‘ el TR 2 Gy ee) 410 4to _ FpR=_2 +) 1 +95 240 ite se ss Fnfo 3) - Matas Ogee RO, 22 GF AuC- Area under the césave LIT Oe LPH o "61 FPR Agwedredel Spodd al D495 be greciky Than Nea barec Wt 41 LT) the demain enpartee oak highes TPR 2 beast FPR thea Thies) {| hecunt hivhen TPR Poeosal bait FPR thea Th(e2) Scanned with CamScanner | K Neoses Ne; Men : ma the_k vale olol i a a be io OEE Se Jatt get cond _—Abors fae wUng OY neg boe: at se Dd thee "K value 29.5 i apeyy An Mis case he Sein k | ig neo Ihe euteny ein aoe So 2) Veealevlale Me dis hunae A of the nearest neighbors 3) How many newest! Neighhes be lon eealescs Cates rg A | 3 phy 42 how many beloag b 7 Cakygany 2 2 pe Cakegeny iz 4) Now the catagory vailh mare poinks nearcd fro ry point, we_conside, a The aueay pointe be berg = =p—le that ager; Thetis hoes k Neors

You might also like