diff --git a/README.md b/README.md index 3dd8709..112f951 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@ This repository contains the materials for D-Lab’s Python Machine Learning workshop. -### Prerequisites +## Prerequisites Prior experience with [Python Fundamentals](https://github.com/dlab-berkeley/Python-Fundamentals), [Python Data Visualization](https://github.com/dlab-berkeley/Python-Data-Visualization), and [Python Data Wrangling](https://github.com/dlab-berkeley/Python-Data-Wrangling) is assumed. -Check D-Lab's [Learning Pathways](https://dlab-berkeley.github.io/dlab-workshops/python_path.html) to figure out which of our workshops to take! +Check out D-Lab’s [Workshop Catalog](https://dlab-berkeley.github.io/dlab-workshops/) to browse all workshops, see what’s running now, and review prerequisites. ## Workshop Goals diff --git a/data/penguins_X_test.csv b/data/penguins_X_test.csv index 787f057..b0b9e7a 100644 --- a/data/penguins_X_test.csv +++ b/data/penguins_X_test.csv @@ -1,85 +1,85 @@ -,Dream,Torgersen,Male,culmen_length_mm,culmen_depth_mm,flipper_length_mm,body_mass_g -0,1.0,0.0,1.0,1.1137063470051127,1.1966994432156142,-0.34260576201176546,-0.38521456736415055 -1,1.0,0.0,1.0,1.35500938885622,1.0424664404409307,-0.5528986989244922,-0.6928426214811282 -2,1.0,0.0,0.0,0.22274126940102307,-0.29421958360632183,-0.6930939901996434,-1.1850475080682923 -3,0.0,0.0,0.0,0.16705595205076665,-1.7337276095033645,0.778956568189444,0.6607208166335733 -4,0.0,0.0,1.0,1.9118625623587762,-0.7569185919303723,2.1108118353033802,1.7681818114546928 -5,0.0,0.0,0.0,0.5382914010524709,-1.32243960210421,1.4799330245652,0.8145348436920622 -6,1.0,0.0,1.0,-1.2065152092555387,0.6825894339666704,-0.13231282509903866,0.322329957104898 -7,1.0,0.0,1.0,-1.1508298919052837,0.4769454302670937,-0.5528986989244922,-0.5697913998343371 -8,0.0,0.0,1.0,0.6125384908528114,-0.962562595629949,1.4799330245652,1.2759769248675286 -9,0.0,0.0,1.0,-0.48260608370221575,0.7340004348915655,-0.6930939901996434,-0.6313170106577326 -10,0.0,0.0,1.0,-1.0765828021049417,0.4769454302670937,-1.1136798640250969,-0.323688956540755 -11,0.0,0.0,0.0,0.4640443112521303,-1.887960612278048,0.6387612769142929,0.41461837333999124 -12,0.0,1.0,1.0,-1.6519977480575836,1.145288442290719,-0.5528986989244922,-0.016060902423777418 -13,0.0,0.0,1.0,1.0951445745550272,-0.5512745882307937,0.8490542138270196,1.4605537573377152 -14,0.0,0.0,0.0,-0.03712354490017095,-1.6823166085784702,0.4985659856391417,0.10699031922301364 -15,0.0,0.0,0.0,-1.670559520507669,0.3741234284173035,-0.7631916358372189,-0.9389450647747103 -16,0.0,1.0,1.0,-0.2041794969509376,0.21989042564262185,-0.34260576201176546,0.5991952058101778 -17,0.0,0.0,0.0,-0.6496620357529824,0.3741234284173035,-0.9734845727499457,-1.246573118891688 -18,1.0,0.0,1.0,1.8933007899086922,1.8650424552392413,0.007882466176112518,0.10699031922301364 -19,1.0,0.0,1.0,1.484941796006817,1.8136314543143461,0.6387612769142929,0.7222464274569689 -20,0.0,0.0,1.0,1.0208974847546866,-0.49986358730590036,1.970616544028229,1.9527586439248794 -21,0.0,0.0,1.0,0.5011678561523012,-0.962562595629949,1.2696400876524732,1.214451314044133 -22,0.0,0.0,0.0,1.2065152092555387,-1.013973596554844,1.0593471507397463,0.968348870750551 -23,0.0,0.0,0.0,0.816717987803749,-1.4252616039539985,0.1480777574512637,0.5069067895750845 -24,1.0,0.0,1.0,0.9837739398545157,1.4023434469151907,0.1480777574512637,-0.200637734893964 -25,1.0,0.0,1.0,-0.8909650776040896,0.7340004348915655,-0.7631916358372189,0.04546470839961811 -26,0.0,0.0,0.0,-0.129932407150597,-1.9393716132029422,0.5686636312767173,0.2300415408698047 -27,1.0,0.0,0.0,-2.2088509215601397,-0.8597405937801605,-0.9033869271123701,-1.4311499513618744 -28,1.0,0.0,1.0,1.484941796006817,0.4769454302670937,0.007882466176112518,-0.200637734893964 -29,0.0,0.0,0.0,0.09280886225042606,-1.271028601179316,0.9191518594645952,0.7837720382803643 -30,1.0,0.0,0.0,-0.5754149459526419,-0.29421958360632183,-0.9734845727499457,-1.246573118891688 -31,0.0,0.0,0.0,-1.5035035684569025,1.0424664404409307,-0.8332892814747945,-0.5082657890109417 -32,0.0,1.0,0.0,-1.5035035684569025,-0.29421958360632183,-0.7631916358372189,-1.4311499513618744 -33,0.0,0.0,1.0,-0.6311002633028969,0.8368224367413539,-0.5528986989244922,-0.5082657890109417 -34,0.0,1.0,0.0,-0.9837739398545157,0.9396444385911422,-0.41270340764934105,-0.9389450647747103 -35,0.0,0.0,1.0,0.761032670453494,-1.0653845974797382,0.5686636312767173,1.5836049789845061 -36,1.0,0.0,1.0,1.0208974847546866,0.9396444385911422,-0.06221517946146307,-0.5082657890109417 -37,0.0,1.0,0.0,-0.9466503949543461,0.3227124274924102,-1.3940704465753992,-0.7236054268928259 -38,1.0,0.0,1.0,-0.5382914010524709,0.9396444385911422,-1.3239728009378238,-0.969707870186408 -39,0.0,0.0,1.0,-0.7981562153536635,0.8882334376662472,-1.1837775096626726,-0.8158938431279192 -40,0.0,1.0,0.0,-1.35500938885622,1.0938774413658257,-0.5528986989244922,-0.9389450647747103 -41,1.0,0.0,1.0,1.2436387541557097,1.2995214450654025,0.1480777574512637,-0.200637734893964 -42,0.0,1.0,1.0,-0.35267367655161874,0.9910554395160374,-0.41270340764934105,-0.2621633457173595 -43,1.0,0.0,0.0,0.2969883592013636,1.145288442290719,-0.48280105328691664,-0.846656648539617 -44,1.0,0.0,0.0,-1.3178858439560504,0.7340004348915655,-0.8332892814747945,-0.8774194539513147 -45,0.0,1.0,1.0,0.3341119041015333,0.8882334376662472,-0.27250811637418987,-0.07758651324717294 -46,0.0,0.0,1.0,1.7448066103080095,-0.7055075910054771,1.2696400876524732,1.5836049789845061 -47,1.0,0.0,0.0,-1.2436387541557097,-0.19139758175653346,-0.6229963445620678,-1.49267556218527 -48,1.0,0.0,1.0,1.2622005266057938,0.9396444385911422,0.6387612769142929,-0.13911212407056847 -49,0.0,0.0,0.0,-0.24130304185110724,-1.7851386104282596,0.4985659856391417,-0.323688956540755 -50,0.0,0.0,0.0,0.6867855806531533,-1.1167955984046325,1.0593471507397463,0.6607208166335733 -51,0.0,0.0,0.0,0.9466503949543461,-1.3738506030291042,0.778956568189444,0.5069067895750845 -52,0.0,0.0,1.0,0.5197296286023854,-0.5512745882307937,0.9892495051021708,1.5836049789845061 -53,0.0,0.0,1.0,-0.5382914010524709,0.5283564311919869,-0.6229963445620678,-0.200637734893964 -54,0.0,0.0,0.0,-1.4106947062064763,-0.03716457898184999,-1.1837775096626726,-1.6772523946554565 -55,0.0,0.0,0.0,-0.09280886225042606,-1.5280836058037877,1.3397377332900489,0.5991952058101778 -56,0.0,0.0,0.0,0.5939767184027273,-1.7851386104282596,0.9191518594645952,0.8760604545154577 -57,0.0,0.0,0.0,0.0,-1.8365496113531536,0.4985659856391417,0.16851593004640916 -58,0.0,0.0,1.0,1.3178858439560504,-0.44845258638100527,1.3397377332900489,2.1988610872184613 -59,0.0,0.0,0.0,-0.07424708980034059,-1.6823166085784702,1.129444796377322,0.8452976491037599 -60,0.0,0.0,1.0,-0.37123544900170424,1.1966994432156142,-0.06221517946146307,-0.200637734893964 -61,1.0,0.0,0.0,-0.14849417960068118,-0.29421958360632183,-0.9734845727499457,-1.615726783832061 -62,0.0,1.0,1.0,-0.5382914010524709,0.7340004348915655,-0.8332892814747945,-1.092759091833199 -63,0.0,0.0,1.0,0.7053473531032375,-1.1167955984046325,0.9892495051021708,1.7681818114546928 -64,1.0,0.0,1.0,1.3921329337563908,0.7854114358164588,-0.9734845727499457,-1.1850475080682923 -65,1.0,0.0,0.0,-1.484941796006817,-0.03716457898184999,-0.9734845727499457,-0.6313170106577326 -66,0.0,0.0,0.0,0.48260608370221575,-1.5280836058037877,0.6387612769142929,0.7837720382803643 -67,1.0,0.0,1.0,1.763368382758095,1.4023434469151907,0.2882730487264149,0.3530927625165957 -68,0.0,1.0,1.0,-0.48260608370221575,0.6825894339666704,0.07798011181368811,-0.41597737277584834 -69,0.0,0.0,0.0,-1.3921329337563908,-0.29421958360632183,-1.3940704465753992,-1.6772523946554565 -70,1.0,0.0,1.0,0.9280886225042606,1.248110444140509,0.778956568189444,0.10699031922301364 -71,0.0,0.0,0.0,-1.577750658257243,-0.49986358730590036,-0.41270340764934105,-1.0619962864215013 -72,1.0,0.0,1.0,1.0580210296548576,0.7340004348915655,-0.41270340764934105,-0.7543682323045237 -73,1.0,0.0,0.0,-0.3341119041015333,0.6825894339666704,-1.464168092212975,-0.8158938431279192 -74,0.0,1.0,1.0,-0.2784265867512782,1.8136314543143461,-0.27250811637418987,0.3530927625165957 -75,0.0,1.0,0.0,-1.3735711613063053,0.3227124274924102,-1.1136798640250969,-0.6313170106577326 -76,1.0,0.0,0.0,-1.8561772450085212,-0.03716457898184999,-1.1136798640250969,-1.0004706755981059 -77,0.0,0.0,1.0,-0.4454825388020448,0.4255344293421986,-0.6229963445620678,-0.323688956540755 -78,0.0,0.0,0.0,-1.614874203157414,0.8882334376662472,-0.9734845727499457,-0.5082657890109417 -79,0.0,0.0,1.0,1.0765828021049417,-0.19139758175653346,2.0407141896658048,1.8297074222780882 -80,0.0,0.0,1.0,1.039459257204772,-1.1167955984046325,1.0593471507397463,0.6607208166335733 -81,0.0,0.0,1.0,1.3178858439560504,-0.3456305845312169,1.6902259614779267,1.2759769248675286 -82,0.0,0.0,0.0,0.4640443112521303,-1.4252616039539985,1.129444796377322,0.8452976491037599 -83,0.0,0.0,0.0,-1.002335712304601,0.014246421943043286,-0.13231282509903866,-0.5697913998343371 +Dream,Torgersen,Male,culmen_length_mm,culmen_depth_mm,flipper_length_mm,body_mass_g +0.0,1.0,0.0,-1.3221352553486831,0.8242953434059449,-1.0302192457453458,-0.5189315657323167 +1.0,0.0,1.0,-0.6724822142400062,0.6733395646552114,-0.3778537951335012,0.1644114912584602 +1.0,0.0,1.0,1.3847524159374753,1.5790742371596107,-0.5228238952694666,-0.549992613777352 +0.0,1.0,0.0,-1.340181173157258,0.3211094142368345,-1.1751893458813112,-0.643175757912458 +0.0,1.0,1.0,-0.5281148717714103,0.7236581575721232,-0.8852491456093803,-1.1090914785879877 +1.0,0.0,0.0,-1.213859748497238,-0.182076514932276,-0.667793995405432,-1.5128851031734467 +1.0,0.0,1.0,-0.8709873101343234,0.7236581575721232,-0.8127640955413976,0.040167299078318945 +0.0,0.0,1.0,-0.6183444608142823,0.8242953434059449,-0.5953089453374494,-0.5189315657323167 +0.0,1.0,1.0,-0.8529413923257501,1.730030015910344,-0.8127640955413976,-0.7052978540025285 +0.0,0.0,0.0,0.2659055118058626,-1.6413157095226967,0.636936905818257,-0.02195479701175168 +0.0,0.0,1.0,0.9516503885316889,-0.7355810370182982,1.1443322562941363,2.028074373960579 +0.0,0.0,0.0,0.21176775838013995,-1.188448373270497,0.7819070059542225,1.220487124789661 +0.0,0.0,1.0,0.2659055118058626,-1.0878111874366752,1.3617874064980844,0.9719987404293784 +1.0,0.0,1.0,-0.4920230361542623,1.5790742371596107,-0.5228238952694666,-0.8295420461826698 +0.0,0.0,0.0,0.9155585529145409,-1.188448373270497,1.3617874064980844,1.1583650286995903 +0.0,0.0,0.0,0.6087779501687758,-1.2890855591043195,0.7819070059542225,0.6303272119339899 +0.0,0.0,0.0,0.3741810186573092,-1.9935458599410745,0.7094219558862398,0.35077777952867206 +0.0,0.0,1.0,0.8433748816802437,-0.7355810370182982,0.4919668056822916,1.4068534130598727 +1.0,0.0,0.0,0.21176775838013995,0.3211094142368345,-0.23288369499753572,-0.33256527746210485 +1.0,0.0,1.0,-0.7627118032828781,0.9752511221566784,-1.247674395949294,0.537144067798884 +0.0,0.0,0.0,-0.13110467998277447,-1.5909971166057857,0.4919668056822916,0.44396092366377804 +0.0,0.0,0.0,-1.069492406028642,-0.08143932909845428,-1.465129546153242,-1.2954577668581995 +0.0,0.0,1.0,1.0418799775745609,-0.182076514932276,2.0866379071779115,1.8417080856903671 +1.0,0.0,1.0,-0.5822526251971343,0.8746139363228549,0.4919668056822916,0.10228939516838957 +1.0,0.0,0.0,0.39222693646588386,0.17015363548610096,-1.0302192457453458,-0.7052978540025285 +1.0,0.0,0.0,-0.6905281320485795,-0.031120736181542513,-0.5953089453374494,-1.0159083344528816 +0.0,0.0,1.0,1.0418799775745609,-0.6349438511844756,2.014152857109929,2.1523185661407203 +1.0,0.0,1.0,-1.1236301594543658,0.47206519298756794,-0.5953089453374494,-0.5810536618223874 +0.0,0.0,0.0,-1.1055842416457913,0.7236581575721232,-2.1174949967650867,-1.3265188149032348 +0.0,1.0,0.0,-0.5281148717714103,0.22047222840301273,-1.3926444960852593,-1.2643967188131642 +0.0,0.0,0.0,-0.14915059779134784,-1.3394041520212305,0.4919668056822916,0.28865568343860143 +1.0,0.0,0.0,-1.069492406028642,0.22047222840301273,-1.0302192457453458,-0.9848472864078464 +0.0,0.0,1.0,0.4102728542744572,-0.6852624441013865,0.9993621561581707,1.034120836519449 +1.0,0.0,1.0,-0.5642067073885596,0.8746139363228549,-1.247674395949294,-0.3946873735521754 +1.0,0.0,1.0,0.013262662485821404,1.2771626796581437,-0.3778537951335012,0.22653358734853082 +1.0,0.0,0.0,0.5005024433173292,-0.3330322936830095,-0.8852491456093803,-0.7052978540025285 +0.0,0.0,0.0,0.8433748816802437,-1.540678523688875,0.636936905818257,0.28865568343860143 +0.0,1.0,1.0,-0.7807577210914515,0.6230209717382996,-0.8127640955413976,-0.3946873735521754 +1.0,0.0,0.0,1.0418799775745609,0.06951644965227922,-0.23288369499753572,-0.6742368059574932 +1.0,0.0,0.0,0.3019973474230119,-0.08143932909845428,-0.45033884520148393,-0.7052978540025285 +1.0,0.0,0.0,0.5365942789344784,0.06951644965227922,-1.1751893458813112,-0.643175757912458 +1.0,0.0,0.0,-1.1597219950715139,1.0758883079905002,-1.465129546153242,-1.140152526633023 +0.0,0.0,0.0,-1.7191454471373202,0.47206519298756794,-1.0302192457453458,-1.637129295353588 +0.0,0.0,0.0,0.32004326523158527,-1.2890855591043195,0.636936905818257,-0.02195479701175168 +0.0,0.0,1.0,1.2764769090860286,-0.3330322936830095,1.724212656837998,1.2826092208797315 +1.0,0.0,1.0,1.3125687447031766,1.3777998654919654,-0.23288369499753572,-0.643175757912458 +1.0,0.0,0.0,-0.29351794025994377,0.06951644965227922,-1.465129546153242,-0.7674199500925992 +1.0,0.0,1.0,1.835900361151835,1.8306672017441659,-0.015428544793587521,0.10228939516838957 +1.0,0.0,1.0,1.258430991277454,0.8242953434059449,0.12954155534237793,-0.14619898919189295 +0.0,1.0,1.0,-1.213859748497238,1.6797114229934325,-0.160398644929553,-0.549992613777352 +0.0,0.0,1.0,2.810379922814852,-0.08143932909845428,2.0866379071779115,2.2765627583208614 +1.0,0.0,0.0,-1.4484566800087044,0.6733395646552114,-1.1027042958133284,-1.3886409109933056 +1.0,0.0,0.0,0.3741810186573092,0.522383785904478,-1.6825846963571904,-1.2022746227230936 +1.0,0.0,0.0,1.2403850734688795,0.3714280071537444,-0.3778537951335012,-0.6742368059574932 +0.0,0.0,0.0,0.39222693646588386,-1.540678523688875,1.1443322562941363,0.1954725393034955 +1.0,0.0,1.0,1.0057881419574128,0.522383785904478,-0.5953089453374494,-0.549992613777352 +0.0,0.0,0.0,-0.97926281698577,0.01919785673536746,-0.160398644929553,-0.5810536618223874 +0.0,0.0,1.0,1.1682014022345821,-0.6349438511844756,1.724212656837998,1.4689755091499435 +1.0,0.0,0.0,0.28395142961443726,1.12620690090741,-0.5228238952694666,-0.8606030942277052 +0.0,0.0,1.0,0.5005024433173292,-0.8865368157690309,0.9993621561581707,1.1583650286995903 +1.0,0.0,0.0,-1.30408933754011,0.6733395646552114,-0.5953089453374494,-0.8916641422727405 +0.0,0.0,1.0,0.9155585529145409,-1.0878111874366752,1.9416678070419462,1.5932197013300846 +0.0,1.0,0.0,-0.5642067073885596,-0.182076514932276,-0.7402790454734148,-0.643175757912458 +0.0,0.0,1.0,0.4283187720830319,-0.7858996299352091,1.4342724565660672,0.9719987404293784 +1.0,0.0,1.0,-0.7988036389000261,0.47206519298756794,-1.1027042958133284,0.28865568343860143 +0.0,0.0,0.0,0.32004326523158527,-1.490359930771964,1.2893023564301016,0.5992661638889546 +0.0,0.0,0.0,-0.6363903786228569,0.3714280071537444,-1.0302192457453458,-1.2643967188131642 +0.0,0.0,0.0,-0.11305876217419984,-1.3897227449381413,1.2168173063621188,0.47502197170881333 +0.0,0.0,1.0,-0.7085740498571542,0.8746139363228549,-0.9577341956773631,0.10228939516838957 +0.0,1.0,0.0,-1.737191364945895,0.6230209717382996,-1.247674395949294,-1.1090914785879877 +0.0,0.0,0.0,0.39222693646588386,-1.3394041520212305,0.5644518557502743,0.7235103560690959 +0.0,0.0,0.0,-0.2574261046427945,-1.741952895356519,0.8543920560222052,0.9098766443393077 +0.0,0.0,1.0,0.5907320323602011,-0.9368554086859417,1.5067575066340497,1.2826092208797315 +0.0,0.0,1.0,0.644869785785925,-1.3394041520212305,0.9993621561581707,1.4689755091499435 +1.0,0.0,0.0,-1.2860434197315351,0.7236581575721232,-0.8852491456093803,-0.8916641422727405 +1.0,0.0,0.0,0.4463646898916065,0.3714280071537444,-0.667793995405432,-0.8916641422727405 +0.0,0.0,1.0,1.2223391556603047,0.06951644965227922,1.9416678070419462,1.717463893510226 +1.0,0.0,0.0,-0.8168495567086008,0.3211094142368345,-0.9577341956773631,-1.140152526633023 +0.0,1.0,0.0,-0.97926281698577,-0.08143932909845428,-0.9577341956773631,-1.637129295353588 +0.0,0.0,1.0,-0.5461607895799849,1.428118458408877,0.12954155534237793,0.6303272119339899 +1.0,0.0,1.0,-0.7807577210914515,0.3714280071537444,-0.5953089453374494,0.040167299078318945 +1.0,0.0,1.0,0.9877422241488382,0.9249325292397667,-0.08791359486157026,-0.5189315657323167 +0.0,0.0,1.0,1.3125687447031766,-1.490359930771964,1.2168173063621188,1.344731316969802 +0.0,1.0,0.0,-1.412364844391555,0.01919785673536746,-1.0302192457453458,-1.3265188149032348 diff --git a/data/penguins_X_train.csv b/data/penguins_X_train.csv index e6635f7..a490bfd 100644 --- a/data/penguins_X_train.csv +++ b/data/penguins_X_train.csv @@ -1,250 +1,250 @@ -,Dream,Torgersen,Male,culmen_length_mm,culmen_depth_mm,flipper_length_mm,body_mass_g -0,1.0,0.0,1.0,1.169391664355368,1.453754447840086,-0.27250811637418987,-1.1235218972448968 -1,0.0,0.0,0.0,-1.1879534368054532,-0.08857557990674508,-1.1136798640250969,-0.7543682323045237 -2,0.0,0.0,0.0,0.3341119041015333,-1.5280836058037877,1.2696400876524732,0.5991952058101778 -3,1.0,0.0,1.0,-0.5382914010524709,0.16847942471772676,-0.7631916358372189,-0.38521456736415055 -4,0.0,0.0,1.0,-0.723909125553323,0.8882334376662472,-0.9033869271123701,0.10699031922301364 -5,0.0,0.0,1.0,0.816717987803749,-1.32243960210421,0.8490542138270196,2.014284254748275 -6,1.0,0.0,0.0,1.0765828021049417,0.06565742286793838,-0.20241047073661425,-0.6620798160694304 -7,0.0,0.0,0.0,-0.816717987803749,1.8136314543143461,-0.6930939901996434,-0.38521456736415055 -8,0.0,0.0,0.0,0.9466503949543461,-1.2196176002544208,1.3397377332900489,1.1529257032207376 -9,0.0,1.0,1.0,-1.169391664355368,1.3509324459902976,-0.20241047073661425,-0.8774194539513147 -10,1.0,0.0,1.0,-0.7795944429035794,0.9910554395160374,-1.1837775096626726,0.5376695949867824 -11,1.0,0.0,0.0,0.6496620357529824,-0.19139758175653346,-0.13231282509903866,-0.38521456736415055 -12,0.0,1.0,0.0,-1.7448066103080095,0.014246421943043286,-0.8332892814747945,-1.246573118891688 -13,1.0,0.0,0.0,0.37123544900170424,0.8882334376662472,-0.41270340764934105,-0.07758651324717294 -14,1.0,0.0,1.0,-0.816717987803749,0.4769454302670937,-1.0435822183875214,0.2915671516932002 -15,0.0,0.0,0.0,-0.7981562153536635,0.2713014265675151,-0.5528986989244922,-1.246573118891688 -16,1.0,0.0,1.0,1.522065340906988,0.8368224367413539,-0.27250811637418987,-0.9389450647747103 -17,0.0,0.0,0.0,-0.2598648143011927,-1.7851386104282596,0.8490542138270196,0.9068232599271554 -18,1.0,0.0,0.0,-1.2993240715059649,-0.3456305845312169,-1.1136798640250969,-1.0004706755981059 -19,0.0,0.0,0.0,-0.09280886225042606,-1.013973596554844,0.8490542138270196,0.5376695949867824 -20,1.0,0.0,1.0,1.4292564786565618,1.6079874506147693,-0.48280105328691664,-0.5390285944226394 -21,0.0,0.0,0.0,0.6311002633028969,-1.32243960210421,0.778956568189444,0.6299580112218756 -22,0.0,1.0,1.0,-1.2622005266057938,1.145288442290719,-1.1837775096626726,-0.38521456736415055 -23,0.0,0.0,1.0,-1.0765828021049417,1.453754447840086,-0.7631916358372189,-0.38521456736415055 -24,0.0,1.0,1.0,-0.9095268500541751,0.7854114358164588,-1.3940704465753992,-0.5697913998343371 -25,1.0,0.0,0.0,-0.2784265867512782,0.06565742286793838,-0.9734845727499457,-1.0619962864215013 -26,0.0,1.0,1.0,-1.2436387541557097,1.7108094524645578,-0.13231282509903866,-0.5390285944226394 -27,0.0,0.0,1.0,0.9652121674044315,-1.013973596554844,1.4098353789276243,2.5680147521588346 -28,0.0,0.0,0.0,-1.1322681194551982,0.7340004348915655,-2.0249492573135797,-1.3080987297150835 -29,0.0,1.0,1.0,-0.16705595205076665,1.0424664404409307,-0.27250811637418987,-0.8774194539513147 -30,0.0,0.0,0.0,0.4640443112521303,-1.3738506030291042,0.8490542138270196,0.2300415408698047 -31,0.0,0.0,1.0,-0.6311002633028969,0.7340004348915655,-1.253875155300248,-0.8158938431279192 -32,0.0,1.0,1.0,-0.8909650776040896,1.248110444140509,-0.41270340764934105,0.5684324003984801 -33,0.0,0.0,1.0,0.6682238082030679,-1.3738506030291042,0.9892495051021708,1.4605537573377152 -34,0.0,0.0,1.0,-0.5011678561523012,2.0192754580139245,-0.41270340764934105,0.2300415408698047 -35,1.0,0.0,0.0,0.5568531735025564,0.06565742286793838,-1.1136798640250969,-0.6313170106577326 -36,0.0,0.0,1.0,1.2065152092555387,-0.654096590080583,1.6902259614779267,1.4605537573377152 -37,1.0,0.0,1.0,1.614874203157414,1.3509324459902976,-0.27250811637418987,-0.6005542052460349 -38,0.0,0.0,1.0,1.1137063470051127,-0.654096590080583,1.6201283158403512,1.3990281465143197 -39,0.0,0.0,0.0,0.16705595205076665,-1.9907826141278362,0.8490542138270196,1.091400092397342 -40,1.0,0.0,0.0,0.31555013165144913,-0.08857557990674508,-0.41270340764934105,-0.6928426214811282 -41,1.0,0.0,0.0,-0.8352797602538345,0.3227124274924102,-0.9033869271123701,-1.1235218972448968 -42,1.0,0.0,1.0,1.2250769817056242,1.145288442290719,-0.5528986989244922,-0.5082657890109417 -43,0.0,1.0,1.0,-1.7448066103080095,2.0192754580139245,-0.20241047073661425,0.2300415408698047 -44,1.0,0.0,0.0,-0.2784265867512782,-0.24280858268142855,-0.9734845727499457,-1.0619962864215013 -45,1.0,0.0,1.0,-0.5939767184027273,0.8882334376662472,0.4985659856391417,0.10699031922301364 -46,0.0,0.0,0.0,0.6496620357529824,-1.5280836058037877,0.5686636312767173,0.47614398416338677 -47,0.0,1.0,0.0,-1.35500938885622,0.8368224367413539,-0.9734845727499457,-0.5082657890109417 -48,0.0,1.0,0.0,-1.447818251106646,-0.5512745882307937,-0.9734845727499457,-0.8158938431279192 -49,1.0,0.0,0.0,-1.3921329337563908,0.4255344293421986,-1.3239728009378238,-1.3080987297150835 -50,0.0,0.0,1.0,1.1879534368054532,-0.7569185919303723,1.4799330245652,1.8912330331014837 -51,0.0,0.0,0.0,0.4454825388020448,-1.1167955984046325,1.0593471507397463,0.5991952058101778 -52,0.0,0.0,1.0,0.2784265867512782,-1.1167955984046325,1.3397377332900489,0.968348870750551 -53,0.0,0.0,0.0,0.3341119041015333,-1.32243960210421,0.6387612769142929,-0.016060902423777418 -54,0.0,0.0,0.0,-1.0951445745550272,-0.3456305845312169,-0.20241047073661425,-0.47750298359924387 -55,0.0,0.0,0.0,0.4640443112521303,-1.2196176002544208,1.129444796377322,1.214451314044133 -56,0.0,0.0,0.0,0.2784265867512782,-1.6823166085784702,0.6387612769142929,-0.016060902423777418 -57,1.0,0.0,0.0,-1.3735711613063053,0.6311784330417753,-1.1837775096626726,-0.9081822593630126 -58,1.0,0.0,0.0,-2.023233197059288,-0.5512745882307937,-1.6043633834881261,-1.615726783832061 -59,0.0,0.0,1.0,0.8352797602538345,-1.579494606728682,1.3397377332900489,1.337502535690924 -60,1.0,0.0,0.0,-1.5406271133570721,0.4255344293421986,0.07798011181368811,-0.8158938431279192 -61,0.0,0.0,1.0,0.22274126940102307,-0.397041585456112,1.5500306702027755,2.137335476395066 -62,0.0,0.0,0.0,-0.37123544900170424,-1.887960612278048,0.6387612769142929,-0.07758651324717294 -63,0.0,0.0,1.0,0.2969883592013636,1.6079874506147693,-0.6930939901996434,0.47614398416338677 -64,1.0,0.0,1.0,-0.4640443112521303,0.6825894339666704,0.007882466176112518,-0.2621633457173595 -65,0.0,0.0,1.0,1.3921329337563908,-0.44845258638100527,2.0407141896658048,1.5836049789845061 -66,1.0,0.0,0.0,0.4454825388020448,0.3227124274924102,-0.6930939901996434,-0.6313170106577326 -67,0.0,0.0,1.0,0.9280886225042606,-0.5512745882307937,1.0593471507397463,1.6451305898079018 -68,0.0,0.0,1.0,0.8909650776040896,-0.49986358730590036,1.4799330245652,2.1988610872184613 -69,1.0,0.0,0.0,0.2598648143011927,0.7854114358164588,-0.9033869271123701,-0.846656648539617 -70,0.0,0.0,1.0,-0.5568531735025564,1.453754447840086,0.1480777574512637,0.6299580112218756 -71,0.0,0.0,1.0,0.22274126940102307,-0.7055075910054771,0.9892495051021708,1.337502535690924 -72,1.0,0.0,1.0,-0.5754149459526419,0.8882334376662472,-1.1837775096626726,-0.38521456736415055 -73,1.0,0.0,1.0,1.1508298919052837,0.8368224367413539,0.07798011181368811,-0.5082657890109417 -74,0.0,0.0,0.0,0.8352797602538345,-1.1167955984046325,1.2696400876524732,0.7837720382803643 -75,0.0,0.0,1.0,-0.24130304185110724,0.5797674321168821,-0.34260576201176546,-0.16987492948226623 -76,1.0,0.0,0.0,-1.484941796006817,0.3741234284173035,-0.7631916358372189,-0.9389450647747103 -77,1.0,0.0,1.0,1.484941796006817,0.9396444385911422,-0.27250811637418987,-0.07758651324717294 -78,0.0,0.0,1.0,0.42692076635195936,-0.7055075910054771,0.9892495051021708,1.0298744815739465 -79,0.0,0.0,1.0,1.1879534368054532,-0.962562595629949,1.6201283158403512,1.6451305898079018 -80,1.0,0.0,1.0,1.039459257204772,0.5283564311919869,-0.5528986989244922,-0.5390285944226394 -81,0.0,1.0,0.0,-1.002335712304601,-0.08857557990674508,-0.9033869271123701,-1.615726783832061 -82,1.0,0.0,1.0,1.35500938885622,0.5283564311919869,-0.27250811637418987,-0.5697913998343371 -83,1.0,0.0,0.0,-1.3364476164061359,0.6825894339666704,-0.5528986989244922,-0.8774194539513147 -84,1.0,0.0,1.0,1.633435975607498,1.453754447840086,0.2882730487264149,0.41461837333999124 -85,1.0,0.0,0.0,2.5986481430119297,0.3227124274924102,-1.3940704465753992,-0.6313170106577326 -86,1.0,0.0,0.0,-0.8352797602538345,-0.24280858268142855,-1.6043633834881261,-1.1850475080682923 -87,1.0,0.0,0.0,0.48260608370221575,0.3227124274924102,-0.5528986989244922,-0.5082657890109417 -88,0.0,0.0,0.0,0.2041794969509376,-1.4252616039539985,0.6387612769142929,0.2300415408698047 -89,1.0,0.0,0.0,1.2807622990558793,0.3741234284173035,-0.34260576201176546,-0.6620798160694304 -90,1.0,0.0,1.0,-0.6867855806531533,0.6825894339666704,-0.34260576201176546,0.16851593004640916 -91,0.0,1.0,0.0,-0.8352797602538345,0.11706842379283165,-1.0435822183875214,-0.5082657890109417 -92,1.0,0.0,0.0,-1.447818251106646,0.06565742286793838,-0.9734845727499457,-1.1235218972448968 -93,1.0,0.0,0.0,1.1508298919052837,0.7854114358164588,-0.20241047073661425,-0.5390285944226394 -94,1.0,0.0,1.0,1.3735711613063053,0.9396444385911422,0.007882466176112518,-0.323688956540755 -95,1.0,0.0,1.0,-0.31555013165144913,2.070686458938818,-0.6930939901996434,-0.07758651324717294 -96,1.0,0.0,1.0,0.9280886225042606,1.1966994432156142,0.6387612769142929,-0.323688956540755 -97,0.0,0.0,0.0,0.24130304185110724,-1.7337276095033645,0.4985659856391417,-0.016060902423777418 -98,1.0,0.0,1.0,1.35500938885622,1.4023434469151907,-0.20241047073661425,-0.6313170106577326 -99,0.0,0.0,0.0,-1.0951445745550272,-0.08857557990674508,-1.3940704465753992,-1.2773359243033857 -100,1.0,0.0,1.0,2.1902891491100545,1.3509324459902976,0.4284683400015661,-0.2621633457173595 -101,0.0,1.0,1.0,-0.7981562153536635,0.6311784330417753,-0.7631916358372189,-0.38521456736415055 -102,0.0,0.0,1.0,0.3897972214517897,-1.0653845974797382,0.9892495051021708,1.091400092397342 -103,0.0,0.0,0.0,-0.22274126940102307,-1.5280836058037877,0.5686636312767173,0.5991952058101778 -104,0.0,0.0,0.0,0.2598648143011927,-1.32243960210421,0.7088589225518684,0.7222464274569689 -105,1.0,0.0,1.0,1.2622005266057938,0.6825894339666704,0.007882466176112518,0.2915671516932002 -106,1.0,0.0,0.0,-1.1879534368054532,1.0938774413658257,-1.3940704465753992,-1.1235218972448968 -107,1.0,0.0,1.0,0.9652121674044315,0.5283564311919869,-0.41270340764934105,0.2300415408698047 -108,0.0,1.0,0.0,-0.816717987803749,0.014246421943043286,-0.34260576201176546,-0.8158938431279192 -109,0.0,1.0,1.0,-0.6311002633028969,0.9396444385911422,-0.13231282509903866,-0.2621633457173595 -110,0.0,0.0,1.0,1.522065340906988,-0.03716457898184999,1.9005188983906536,1.4605537573377152 -111,1.0,0.0,0.0,0.6682238082030679,0.5797674321168821,-0.41270340764934105,-0.4467401781875461 -112,0.0,0.0,1.0,0.4454825388020448,-0.8083295928552664,1.4098353789276243,0.968348870750551 -113,0.0,0.0,1.0,1.5035035684569025,-0.08857557990674508,2.0407141896658048,1.6451305898079018 -114,0.0,0.0,1.0,0.07424708980034059,0.06565742286793838,1.2696400876524732,1.2759769248675286 -115,1.0,0.0,1.0,-1.0580210296548576,1.0424664404409307,-0.8332892814747945,-0.323688956540755 -116,0.0,0.0,1.0,2.8956365022132933,-0.08857557990674508,2.0407141896658048,2.2603866980418568 -117,0.0,1.0,0.0,-1.5406271133570721,-0.08857557990674508,-0.8332892814747945,-1.0619962864215013 -118,0.0,0.0,0.0,-1.5406271133570721,-0.13998658083164017,-1.1136798640250969,-1.3080987297150835 -119,0.0,0.0,1.0,1.0765828021049417,-0.654096590080583,1.970616544028229,2.137335476395066 -120,1.0,0.0,0.0,-1.2436387541557097,0.3227124274924102,-0.6930939901996434,-1.0619962864215013 -121,1.0,0.0,0.0,0.22274126940102307,0.3227124274924102,-0.20241047073661425,-0.323688956540755 -122,1.0,0.0,0.0,0.5197296286023854,-0.3456305845312169,-0.8332892814747945,-0.6928426214811282 -123,0.0,0.0,1.0,-0.6496620357529824,0.8882334376662472,-1.464168092212975,-0.323688956540755 -124,1.0,0.0,0.0,-1.484941796006817,0.6825894339666704,-1.0435822183875214,-1.369624340538479 -125,0.0,0.0,0.0,0.7795944429035794,-1.4766726048788925,0.6387612769142929,0.47614398416338677 -126,0.0,1.0,1.0,0.37123544900170424,2.2249194617135015,-0.48280105328691664,-0.016060902423777418 -127,0.0,0.0,0.0,-1.670559520507669,0.3741234284173035,-0.6229963445620678,-0.6005542052460349 -128,1.0,0.0,1.0,0.8352797602538345,0.16847942471772676,-0.6930939901996434,-1.0004706755981059 -129,0.0,1.0,0.0,-1.0208974847546866,0.3741234284173035,-0.7631916358372189,-1.092759091833199 -130,1.0,0.0,1.0,-0.7981562153536635,0.3741234284173035,-0.5528986989244922,0.04546470839961811 -131,1.0,0.0,0.0,-1.5591888858071574,0.16847942471772676,-0.6930939901996434,-1.2773359243033857 -132,0.0,1.0,0.0,-0.9280886225042606,-0.03716457898184999,-0.6930939901996434,-1.4311499513618744 -133,1.0,0.0,0.0,0.5011678561523012,0.3741234284173035,-0.41270340764934105,-1.1235218972448968 -134,0.0,1.0,0.0,-0.5754149459526419,-0.19139758175653346,-0.6930939901996434,-0.6313170106577326 -135,0.0,0.0,1.0,0.5197296286023854,-0.9111515947050548,0.9892495051021708,1.1529257032207376 -136,0.0,1.0,1.0,-0.4640443112521303,0.5797674321168821,-0.41270340764934105,0.10699031922301364 -137,0.0,0.0,0.0,0.6496620357529824,-1.6309056076535762,0.778956568189444,0.8145348436920622 -138,1.0,0.0,0.0,0.35267367655161874,-0.03716457898184999,-0.7631916358372189,-0.7851310377162215 -139,1.0,0.0,1.0,-0.7053473531032375,1.505165448764981,-0.06221517946146307,-0.2929261511290573 -140,0.0,0.0,0.0,0.2784265867512782,-1.3738506030291042,0.778956568189444,0.6607208166335733 -141,1.0,0.0,1.0,-0.5011678561523012,1.6079874506147693,-0.48280105328691664,-0.8158938431279192 -142,1.0,0.0,1.0,-0.14849417960068118,0.6825894339666704,-0.6229963445620678,-0.13911212407056847 -143,0.0,0.0,0.0,-1.763368382758095,0.4769454302670937,-0.9734845727499457,-1.615726783832061 -144,0.0,1.0,0.0,-1.577750658257243,0.16847942471772676,-0.7631916358372189,-0.6313170106577326 -145,1.0,0.0,0.0,0.3897972214517897,0.5283564311919869,-1.6043633834881261,-1.1850475080682923 -146,0.0,0.0,0.0,0.4083589939018752,-1.579494606728682,1.129444796377322,0.19927873545810693 -147,1.0,0.0,1.0,0.018561772450085477,1.2995214450654025,-0.34260576201176546,0.2300415408698047 -148,1.0,0.0,1.0,1.2065152092555387,1.248110444140509,0.007882466176112518,-0.200637734893964 -149,1.0,0.0,0.0,-0.7053473531032375,-0.03716457898184999,-0.5528986989244922,-1.0004706755981059 -150,1.0,0.0,1.0,-0.9652121674044315,1.453754447840086,-0.7631916358372189,-0.323688956540755 -151,1.0,0.0,0.0,1.1322681194551982,0.3741234284173035,-0.7631916358372189,-1.0004706755981059 -152,1.0,0.0,0.0,0.761032670453494,-0.397041585456112,-0.13231282509903866,-1.092759091833199 -153,0.0,1.0,0.0,-0.9652121674044315,0.21989042564262185,-0.6930939901996434,-1.1542847026565946 -154,0.0,0.0,1.0,1.2622005266057938,-0.7569185919303723,1.7603236071155024,1.214451314044133 -155,1.0,0.0,0.0,0.5382914010524709,-0.29421958360632183,-0.6229963445620678,-1.8618292271256431 -156,0.0,1.0,1.0,-0.4083589939018752,1.145288442290719,-0.20241047073661425,0.2915671516932002 -157,1.0,0.0,1.0,1.2807622990558793,0.9910554395160374,-0.34260576201176546,-0.8158938431279192 -158,0.0,0.0,1.0,-0.9652121674044315,0.014246421943043286,-1.464168092212975,-0.5082657890109417 -159,1.0,0.0,1.0,-0.816717987803749,0.8368224367413539,-0.7631916358372189,0.47614398416338677 -160,0.0,1.0,0.0,-0.6867855806531533,0.4255344293421986,-0.41270340764934105,-1.1850475080682923 -161,0.0,0.0,0.0,0.2041794969509376,-1.3738506030291042,0.9892495051021708,0.968348870750551 -162,0.0,0.0,1.0,1.2065152092555387,-0.654096590080583,1.4799330245652,1.6451305898079018 -163,0.0,1.0,1.0,-0.22274126940102307,0.6825894339666704,-0.41270340764934105,0.04546470839961811 -164,0.0,0.0,1.0,1.039459257204772,-0.6026855891556887,1.6902259614779267,1.8297074222780882 -165,0.0,0.0,1.0,1.0208974847546866,-0.5512745882307937,1.6201283158403512,1.7681818114546928 -166,0.0,0.0,0.0,-0.11137063470051153,-1.4252616039539985,1.1995424420148977,0.47614398416338677 -167,0.0,0.0,1.0,1.1508298919052837,-1.4766726048788925,1.1995424420148977,1.8297074222780882 -168,1.0,0.0,1.0,-1.4292564786565618,1.1966994432156142,-0.7631916358372189,-0.5082657890109417 -169,0.0,0.0,0.0,0.22274126940102307,-1.2196176002544208,0.778956568189444,1.214451314044133 -170,1.0,0.0,0.0,-1.4106947062064763,-0.08857557990674508,-0.41270340764934105,-1.092759091833199 -171,1.0,0.0,0.0,0.2784265867512782,-0.08857557990674508,-0.34260576201176546,-0.8774194539513147 -172,0.0,1.0,0.0,-1.633435975607498,-0.654096590080583,-1.0435822183875214,-1.4311499513618744 -173,1.0,0.0,0.0,-0.09280886225042606,0.4769454302670937,0.07798011181368811,-1.0004706755981059 -174,1.0,0.0,1.0,1.2993240715059649,0.8368224367413539,0.1480777574512637,-0.13911212407056847 -175,1.0,0.0,0.0,-1.484941796006817,0.3227124274924102,-0.41270340764934105,-0.9389450647747103 -176,0.0,0.0,1.0,1.2436387541557097,-1.1167955984046325,1.5500306702027755,1.6451305898079018 -177,0.0,0.0,1.0,-1.1879534368054532,0.9910554395160374,-0.48280105328691664,-0.5697913998343371 -178,0.0,0.0,1.0,-1.1508298919052837,1.453754447840086,-0.7631916358372189,0.04546470839961811 -179,0.0,0.0,0.0,-0.816717987803749,0.2713014265675151,-1.0435822183875214,-0.8774194539513147 -180,1.0,0.0,0.0,0.31555013165144913,0.06565742286793838,-0.5528986989244922,-0.7543682323045237 -181,0.0,0.0,1.0,1.1137063470051127,-0.44845258638100527,2.0407141896658048,1.8297074222780882 -182,0.0,0.0,0.0,-0.42692076635195936,-1.271028601179316,0.6387612769142929,0.5991952058101778 -183,1.0,0.0,0.0,-0.2969883592013636,0.06565742286793838,-1.3940704465753992,-0.7543682323045237 -184,0.0,0.0,0.0,0.4083589939018752,-1.3738506030291042,0.5686636312767173,0.7222464274569689 -185,0.0,1.0,1.0,-1.002335712304601,2.070686458938818,-0.6930939901996434,-0.5082657890109417 -186,1.0,0.0,0.0,1.2065152092555387,0.6311784330417753,-0.06221517946146307,-1.0004706755981059 -187,1.0,0.0,0.0,-1.0951445745550272,0.7340004348915655,-0.7631916358372189,-0.6313170106577326 -188,0.0,0.0,1.0,1.35500938885622,-1.5280836058037877,1.1995424420148977,1.337502535690924 -189,0.0,0.0,0.0,-1.169391664355368,-0.6026855891556887,-1.253875155300248,-1.4003871459501767 -190,0.0,1.0,1.0,-0.8724033051540054,1.7622204533894528,-0.7631916358372189,-0.6928426214811282 -191,0.0,0.0,1.0,0.18561772450085212,-0.9111515947050548,1.3397377332900489,1.0298744815739465 -192,1.0,0.0,1.0,-0.8909650776040896,2.0192754580139245,-0.34260576201176546,-0.07758651324717294 -193,1.0,0.0,1.0,-0.6125384908528114,-0.08857557990674508,-0.7631916358372189,-0.6005542052460349 -194,1.0,0.0,1.0,-0.5382914010524709,0.4769454302670937,0.2882730487264149,0.10699031922301364 -195,0.0,0.0,0.0,0.24130304185110724,-1.7851386104282596,0.6387612769142929,0.10699031922301364 -196,0.0,0.0,1.0,0.4083589939018752,-1.1682065993295265,1.4098353789276243,1.337502535690924 -197,0.0,0.0,1.0,1.577750658257243,-0.8083295928552664,1.4098353789276243,1.5220793681611107 -198,0.0,0.0,1.0,-1.169391664355368,0.7854114358164588,-1.464168092212975,-0.7543682323045237 -199,0.0,0.0,1.0,0.816717987803749,-0.44845258638100527,1.3397377332900489,1.4605537573377152 -200,0.0,0.0,0.0,-0.129932407150597,-1.6309056076535762,0.4985659856391417,0.44538117875168903 -201,1.0,0.0,0.0,-1.0951445745550272,0.21989042564262185,-0.9734845727499457,-0.969707870186408 -202,0.0,0.0,0.0,-1.1508298919052837,0.5797674321168821,-1.8847539660384285,-1.0004706755981059 -203,0.0,0.0,0.0,0.3897972214517897,-2.0421936150527316,0.7088589225518684,0.3530927625165957 -204,0.0,0.0,0.0,-0.14849417960068118,-1.3738506030291042,0.4985659856391417,0.2915671516932002 -205,0.0,0.0,0.0,-0.2041794969509376,-2.0936046159776254,0.9892495051021708,0.968348870750551 -206,0.0,0.0,0.0,0.6496620357529824,-1.1167955984046325,1.1995424420148977,0.9068232599271554 -207,0.0,0.0,0.0,0.31555013165144913,-1.6823166085784702,0.9191518594645952,0.2300415408698047 -208,0.0,0.0,1.0,1.1137063470051127,-0.962562595629949,1.3397377332900489,1.6451305898079018 -209,0.0,0.0,0.0,0.5939767184027273,-0.8597405937801605,0.9892495051021708,0.9375860653388532 -210,0.0,1.0,0.0,-1.7819301552081805,0.6311784330417753,-1.1837775096626726,-1.092759091833199 -211,0.0,0.0,1.0,-0.5382914010524709,0.9910554395160374,-0.9033869271123701,-0.13911212407056847 -212,0.0,0.0,1.0,0.8724033051540054,-1.0653845974797382,1.4799330245652,1.3990281465143197 -213,1.0,0.0,1.0,-0.6311002633028969,0.014246421943043286,-0.9734845727499457,-0.9081822593630126 -214,1.0,0.0,1.0,1.4663800235567315,1.1966994432156142,0.3583706943639905,-0.323688956540755 -215,0.0,0.0,1.0,1.1322681194551982,-1.1167955984046325,1.6902259614779267,0.968348870750551 -216,0.0,0.0,0.0,-0.5754149459526419,-1.7851386104282596,0.9191518594645952,0.5376695949867824 -217,0.0,0.0,1.0,-0.14849417960068118,0.9396444385911422,-0.27250811637418987,0.6914836220452711 -218,0.0,0.0,1.0,-0.3341119041015333,1.1966994432156142,-0.27250811637418987,0.07622751381131587 -219,0.0,0.0,0.0,-0.9280886225042606,0.16847942471772676,-1.0435822183875214,-0.8158938431279192 -220,0.0,0.0,0.0,0.2041794969509376,-1.3738506030291042,0.4284683400015661,1.0298744815739465 -221,0.0,0.0,1.0,0.7795944429035794,-0.8083295928552664,1.4098353789276243,1.091400092397342 -222,0.0,0.0,0.0,0.5197296286023854,-1.4766726048788925,0.9892495051021708,0.7837720382803643 -223,0.0,0.0,0.0,0.2784265867512782,-1.7851386104282596,0.9191518594645952,0.5376695949867824 -224,0.0,1.0,0.0,-1.9489861072589472,0.9396444385911422,-0.7631916358372189,-0.7543682323045237 -225,0.0,1.0,0.0,-0.5382914010524709,0.21989042564262185,-1.3239728009378238,-1.246573118891688 -226,1.0,0.0,1.0,-0.5939767184027273,0.6311784330417753,-0.41270340764934105,-0.38521456736415055 -227,0.0,0.0,1.0,0.9837739398545157,-0.7569185919303723,1.129444796377322,2.014284254748275 -228,1.0,0.0,1.0,-0.9280886225042606,0.7854114358164588,-1.1136798640250969,-0.6928426214811282 -229,1.0,0.0,1.0,-1.2622005266057938,0.4769454302670937,-1.6043633834881261,-0.38521456736415055 -230,0.0,0.0,0.0,0.22274126940102307,-1.7337276095033645,0.9892495051021708,0.6607208166335733 -231,0.0,0.0,1.0,0.8724033051540054,-0.7569185919303723,0.4985659856391417,1.3990281465143197 -232,0.0,0.0,1.0,1.002335712304601,-0.7055075910054771,1.0593471507397463,0.8760604545154577 -233,0.0,0.0,0.0,0.8724033051540054,-1.579494606728682,0.6387612769142929,0.2915671516932002 -234,0.0,0.0,1.0,0.85384153270392,-0.6026855891556887,2.0407141896658048,1.9527586439248794 -235,0.0,1.0,0.0,-0.7053473531032375,-0.08857557990674508,-1.7445586747632773,-0.9389450647747103 -236,0.0,0.0,1.0,1.1137063470051127,-1.013973596554844,1.1995424420148977,1.8297074222780882 -237,0.0,0.0,1.0,2.2088509215601397,-0.08857557990674508,1.9005188983906536,1.7066562006312973 -238,1.0,0.0,0.0,0.4083589939018752,0.16847942471772676,-0.9734845727499457,-0.6928426214811282 -239,0.0,0.0,1.0,1.2622005266057938,0.06565742286793838,1.9005188983906536,1.7066562006312973 -240,0.0,0.0,0.0,-1.1322681194551982,0.7340004348915655,-0.5528986989244922,-1.5849639784203633 -241,1.0,0.0,0.0,-1.2993240715059649,-0.13998658083164017,-1.1136798640250969,-1.49267556218527 -242,0.0,1.0,0.0,-1.447818251106646,0.014246421943043286,-0.9734845727499457,-1.3080987297150835 -243,1.0,0.0,0.0,0.4640443112521303,0.3741234284173035,-0.6229963445620678,-0.8774194539513147 -244,0.0,0.0,1.0,0.9466503949543461,-1.1167955984046325,1.9005188983906536,1.5836049789845061 -245,1.0,0.0,0.0,-0.9466503949543461,0.8368224367413539,-0.7631916358372189,-0.7543682323045237 -246,0.0,0.0,1.0,2.060356741959459,-0.6026855891556887,2.0407141896658048,2.014284254748275 -247,0.0,1.0,1.0,0.018561772450085477,0.4255344293421986,0.6387612769142929,-0.2621633457173595 -248,1.0,0.0,0.0,0.4454825388020448,0.7340004348915655,-0.7631916358372189,-0.9389450647747103 +Dream,Torgersen,Male,culmen_length_mm,culmen_depth_mm,flipper_length_mm,body_mass_g +0.0,0.0,0.0,0.1937218405715653,-1.3394041520212305,0.41948175561430884,1.034120836519449 +0.0,0.0,0.0,-0.7988036389000261,0.2707908213199227,-1.1027042958133284,-0.8916641422727405 +1.0,0.0,0.0,0.24785959399728796,0.7739767504890331,-0.9577341956773631,-0.8606030942277052 +0.0,1.0,0.0,-1.502594433434427,-0.08143932909845428,-0.8852491456093803,-1.0780304305429524 +1.0,0.0,0.0,0.3019973474230119,0.06951644965227922,-0.5953089453374494,-0.7674199500925992 +0.0,1.0,1.0,-0.20328835121707178,0.22047222840301273,-0.3778537951335012,0.5992661638889546 +1.0,0.0,1.0,1.2223391556603047,0.6733395646552114,-0.015428544793587521,0.28865568343860143 +0.0,0.0,0.0,-0.20328835121707178,-2.0438644528579855,0.9993621561581707,0.9719987404293784 +1.0,0.0,1.0,-0.943170981368622,1.428118458408877,-0.8127640955413976,-0.33256527746210485 +0.0,0.0,0.0,-1.502594433434427,-0.13175792201536604,-1.1751893458813112,-1.3265188149032348 +1.0,0.0,1.0,-0.5822526251971343,0.6230209717382996,-0.45033884520148393,-0.3946873735521754 +0.0,0.0,1.0,1.1501554844260076,-0.9368554086859417,1.6517276067700153,1.6553417974201552 +0.0,1.0,0.0,-0.8168495567086008,0.1198350425691892,-1.1027042958133284,-0.5189315657323167 +0.0,0.0,0.0,0.46441060770018117,-1.490359930771964,0.636936905818257,0.7856324521591664 +0.0,1.0,0.0,-1.5928240224772992,-0.6349438511844756,-1.1027042958133284,-1.4507630070833761 +0.0,0.0,1.0,-1.0514464882200674,1.428118458408877,-0.8127640955413976,-0.3946873735521754 +0.0,0.0,0.0,0.6268238679773505,-1.0878111874366752,1.2168173063621188,0.9098766443393077 +1.0,0.0,1.0,-0.5281148717714103,0.47206519298756794,0.2745116554783434,0.10228939516838957 +0.0,0.0,1.0,0.8072830460630943,-1.540678523688875,1.3617874064980844,1.344731316969802 +0.0,0.0,1.0,-0.4920230361542623,1.9816229804948995,-0.45033884520148393,0.22653358734853082 +0.0,1.0,0.0,-1.412364844391555,-0.534306665350653,-1.0302192457453458,-0.8295420461826698 +1.0,0.0,1.0,-0.5281148717714103,0.9249325292397667,-1.3926444960852593,-0.9848472864078464 +0.0,0.0,1.0,0.680961621403073,-1.0878111874366752,0.9993621561581707,1.7795859896002966 +0.0,0.0,1.0,1.0960177310002848,-1.0878111874366752,1.724212656837998,0.9719987404293784 +0.0,1.0,1.0,-0.4017934471113903,1.12620690090741,-0.23288369499753572,0.28865568343860143 +1.0,0.0,1.0,1.1140636488088596,0.8242953434059449,0.05705650527439521,-0.5189315657323167 +0.0,0.0,0.0,0.08544633372011871,-1.2387669661874088,0.926877106090188,0.7856324521591664 +0.0,0.0,1.0,0.8975126351059662,-0.534306665350653,1.0718472062261535,1.6553417974201552 +0.0,0.0,0.0,-1.5747781046687257,0.8746139363228549,-1.0302192457453458,-0.5189315657323167 +0.0,1.0,1.0,-0.8709873101343234,1.2268440867412336,-0.45033884520148393,0.5682051158439193 +0.0,0.0,1.0,-0.365701611494241,1.176525493824322,-0.08791359486157026,-0.20832108528196355 +0.0,0.0,0.0,0.22981367618871332,-1.741952895356519,0.636936905818257,0.10228939516838957 +1.0,0.0,0.0,-1.2679975019229606,-0.13175792201536604,-1.1751893458813112,-1.5128851031734467 +1.0,0.0,0.0,0.46441060770018117,0.3211094142368345,-0.5953089453374494,-0.5189315657323167 +1.0,0.0,0.0,1.1682014022345821,0.6230209717382996,-0.08791359486157026,-1.0159083344528816 +1.0,0.0,0.0,1.1140636488088596,0.7739767504890331,-0.23288369499753572,-0.549992613777352 +0.0,1.0,1.0,-0.3476556936856664,0.9752511221566784,-0.45033884520148393,-0.2704431813720342 +0.0,0.0,1.0,0.8433748816802437,-1.0374925945197644,1.5067575066340497,1.4068534130598727 +0.0,1.0,1.0,-0.455931200537113,0.5727023788213897,-0.45033884520148393,0.10228939516838957 +0.0,0.0,0.0,0.5185483611259039,-1.2890855591043195,1.5067575066340497,0.8166935002042018 +0.0,0.0,0.0,-0.0950128443656252,-1.490359930771964,1.3617874064980844,0.5992661638889546 +1.0,0.0,0.0,-0.8168495567086008,-0.23239510784918777,-1.6825846963571904,-1.2022746227230936 +1.0,0.0,0.0,-1.502594433434427,0.4217466000706562,0.05705650527439521,-0.8295420461826698 +1.0,0.0,1.0,-1.3943189265829818,1.176525493824322,-0.8127640955413976,-0.5189315657323167 +0.0,0.0,0.0,-1.069492406028642,-0.3330322936830095,-0.23288369499753572,-0.4878705176872814 +0.0,0.0,1.0,-0.6363903786228569,0.8746139363228549,-1.5376145962212249,-0.33256527746210485 +0.0,1.0,1.0,-1.7010995293287456,1.9816229804948995,-0.23288369499753572,0.22653358734853082 +1.0,0.0,1.0,1.1862473200431567,1.12620690090741,-0.5953089453374494,-0.5189315657323167 +1.0,0.0,0.0,-0.9251250635600474,0.8242953434059449,-0.8127640955413976,-0.7674199500925992 +1.0,0.0,1.0,1.438890169363198,0.47206519298756794,-0.015428544793587521,-0.20832108528196355 +0.0,0.0,0.0,-0.9070791457514727,0.17015363548610096,-1.1027042958133284,-0.8295420461826698 +0.0,0.0,1.0,1.6915330186832391,-0.6852624441013865,1.2893023564301016,1.5932197013300846 +1.0,0.0,0.0,-2.1522474745431053,-0.83621822285212,-0.9577341956773631,-1.4507630070833761 +1.0,0.0,0.0,-0.2754720224513691,-0.23239510784918777,-1.0302192457453458,-1.0780304305429524 +0.0,1.0,1.0,-0.97926281698577,2.0319415734118094,-0.7402790454734148,-0.5189315657323167 +0.0,0.0,0.0,-1.3582270909658325,-0.28271370076609775,-1.465129546153242,-1.6992513914436587 +1.0,0.0,1.0,0.9516503885316889,1.3777998654919654,0.12954155534237793,-0.20832108528196355 +0.0,0.0,0.0,-0.7807577210914515,0.2707908213199227,-0.5953089453374494,-1.2643967188131642 +1.0,0.0,1.0,1.0238340597659874,0.7236581575721232,-0.45033884520148393,-0.7674199500925992 +1.0,0.0,0.0,-1.3582270909658325,0.4217466000706562,-1.3926444960852593,-1.3265188149032348 +0.0,1.0,0.0,-0.9251250635600474,0.3211094142368345,-1.465129546153242,-0.7363589020475639 +1.0,0.0,0.0,0.5185483611259039,-0.28271370076609775,-0.667793995405432,-1.8856176797138706 +0.0,0.0,1.0,-0.3296097758770917,1.176525493824322,-0.3053687450655184,0.07122834712335425 +1.0,0.0,0.0,-0.5642067073885596,-0.28271370076609775,-1.0302192457453458,-1.2643967188131642 +0.0,0.0,1.0,0.7531452926373716,-0.7858996299352091,1.4342724565660672,1.0962429326095195 +0.0,1.0,1.0,-0.22133426902564643,0.6733395646552114,-0.45033884520148393,0.040167299078318945 +0.0,0.0,1.0,-0.5281148717714103,0.522383785904478,-0.667793995405432,-0.20832108528196355 +0.0,0.0,0.0,-1.1055842416457913,0.7236581575721232,-0.5953089453374494,-1.6060682473085526 +0.0,0.0,0.0,0.157630004954416,-1.9432272670241626,0.8543920560222052,1.0962429326095195 +1.0,0.0,0.0,-1.4484566800087044,-0.031120736181542513,-1.0302192457453458,-0.643175757912458 +0.0,0.0,1.0,1.1682014022345821,-0.6349438511844756,1.5067575066340497,1.6553417974201552 +1.0,0.0,1.0,-1.033400570411494,1.0255697150735885,-0.8852491456093803,-0.33256527746210485 +0.0,0.0,1.0,0.9877422241488382,-0.534306665350653,1.6517276067700153,1.7795859896002966 +0.0,0.0,1.0,0.9336044707231156,-0.9871740016028535,1.4342724565660672,2.5871732387712147 +1.0,0.0,0.0,0.4824565255087558,0.3714280071537444,-0.45033884520148393,-1.140152526633023 +1.0,0.0,1.0,1.2042932378517315,1.2771626796581437,0.12954155534237793,-0.20832108528196355 +1.0,0.0,1.0,2.124635046089024,1.3274812725750553,0.41948175561430884,-0.2704431813720342 +1.0,0.0,1.0,-0.5281148717714103,0.17015363548610096,-0.8127640955413976,-0.3946873735521754 +0.0,0.0,1.0,0.3741810186573092,-1.0374925945197644,0.9993621561581707,1.0962429326095195 +1.0,0.0,0.0,-1.340181173157258,0.6230209717382996,-1.247674395949294,-0.9227251903177758 +0.0,0.0,0.0,0.4463646898916065,-1.3897227449381413,1.1443322562941363,0.8477545482492371 +0.0,0.0,0.0,0.157630004954416,-1.6916343024396074,0.7819070059542225,0.6613882599790252 +1.0,0.0,0.0,2.5216452378776615,0.3211094142368345,-1.465129546153242,-0.643175757912458 +1.0,0.0,0.0,-1.213859748497238,0.3211094142368345,-0.7402790454734148,-1.0780304305429524 +0.0,0.0,0.0,-1.1236301594543658,0.5727023788213897,-1.9725248966291213,-1.0159083344528816 +0.0,0.0,0.0,0.24785959399728796,-1.2890855591043195,0.7094219558862398,0.7235103560690959 +0.0,0.0,0.0,0.5005024433173292,-1.4400413378550523,0.9993621561581707,0.7856324521591664 +0.0,0.0,0.0,0.2659055118058626,-1.3394041520212305,0.7819070059542225,0.6613882599790252 +0.0,1.0,1.0,-1.2319056663058112,1.12620690090741,-1.247674395949294,-0.3946873735521754 +0.0,0.0,1.0,1.0779718131917102,-0.9871740016028535,1.2168173063621188,1.8417080856903671 +0.0,1.0,1.0,0.35613510084873456,2.1828973521625428,-0.5228238952694666,-0.02195479701175168 +1.0,0.0,1.0,1.3306146625117514,0.9249325292397667,-0.015428544793587521,-0.33256527746210485 +0.0,0.0,0.0,0.7892371282545196,-1.3897227449381413,0.12954155534237793,0.5060830197538486 +0.0,0.0,0.0,0.1937218405715653,-1.3394041520212305,0.9993621561581707,0.9719987404293784 +0.0,0.0,0.0,1.1682014022345821,-0.9871740016028535,1.0718472062261535,0.9719987404293784 +0.0,0.0,1.0,1.0779718131917102,-0.9368554086859417,1.3617874064980844,1.6553417974201552 +0.0,0.0,0.0,0.5726861145516278,-0.83621822285212,0.9993621561581707,0.940937692384343 +0.0,0.0,0.0,0.4463646898916065,-1.8425900811903408,0.636936905818257,0.4128998756187427 +0.0,0.0,1.0,1.5291197584060698,-0.7858996299352091,1.4342724565660672,1.531097605240014 +0.0,0.0,0.0,0.1937218405715653,-1.3897227449381413,0.636936905818257,0.22653358734853082 +1.0,0.0,1.0,1.1321095666174328,1.428118458408877,-0.3053687450655184,-1.140152526633023 +1.0,0.0,0.0,0.3380891830401599,-0.031120736181542513,-0.8127640955413976,-0.7984809981376345 +0.0,0.0,1.0,1.1501554844260076,-0.7355810370182982,1.5067575066340497,1.9038301817804377 +0.0,0.0,1.0,0.21176775838013995,-0.6852624441013865,0.9993621561581707,1.344731316969802 +0.0,0.0,1.0,2.142680963897599,-0.08143932909845428,1.9416678070419462,1.717463893510226 +0.0,0.0,0.0,0.4463646898916065,-1.188448373270497,1.1443322562941363,1.220487124789661 +1.0,0.0,0.0,-1.412364844391555,0.06951644965227922,-1.0302192457453458,-1.140152526633023 +1.0,0.0,1.0,0.8072830460630943,0.17015363548610096,-0.7402790454734148,-1.0159083344528816 +0.0,0.0,0.0,0.5726861145516278,-1.741952895356519,0.926877106090188,0.8788155962942724 +0.0,0.0,1.0,1.2042932378517315,-1.0878111874366752,1.5792425567020325,1.6553417974201552 +0.0,0.0,1.0,1.0599258953831354,-0.534306665350653,0.8543920560222052,1.4689755091499435 +0.0,1.0,0.0,-0.6905281320485795,-0.08143932909845428,-1.8275547964931558,-0.9537862383628111 +1.0,0.0,1.0,-1.1777679128800886,0.6733395646552114,-0.160398644929553,0.3197167314836368 +0.0,0.0,0.0,-0.07696692655705055,-1.6413157095226967,1.1443322562941363,0.8477545482492371 +0.0,0.0,1.0,0.21176775838013995,-0.3833508865999213,1.5792425567020325,2.1523185661407203 +1.0,0.0,1.0,1.4749820049803473,0.8242953434059449,-0.3053687450655184,-0.9537862383628111 +1.0,0.0,1.0,1.2223391556603047,0.9249325292397667,0.636936905818257,-0.14619898919189295 +0.0,0.0,1.0,-0.6183444608142823,0.7236581575721232,-1.3201594460172767,-0.8295420461826698 +0.0,0.0,1.0,-0.943170981368622,0.01919785673536746,-1.5376145962212249,-0.5189315657323167 +1.0,0.0,0.0,-1.9717882964573614,-0.534306665350653,-1.6825846963571904,-1.637129295353588 +0.0,0.0,1.0,-0.7807577210914515,0.8746139363228549,-1.247674395949294,-0.8295420461826698 +1.0,0.0,1.0,1.438890169363198,1.7803486088272542,0.636936905818257,0.7235103560690959 +1.0,0.0,1.0,-0.6905281320485795,1.478437051325789,-0.08791359486157026,-0.3015042294170695 +1.0,0.0,0.0,0.4283187720830319,0.3211094142368345,-0.7402790454734148,-0.643175757912458 +1.0,0.0,0.0,-1.069492406028642,0.7236581575721232,-0.8127640955413976,-0.643175757912458 +0.0,1.0,0.0,-0.9973087347943447,0.3714280071537444,-0.8127640955413976,-1.1090914785879877 +0.0,1.0,0.0,-1.466502597817279,-0.28271370076609775,-0.8127640955413976,-1.4507630070833761 +1.0,0.0,1.0,-0.3115638580685184,2.0319415734118094,-0.7402790454734148,-0.08407689310182231 +1.0,0.0,0.0,0.35613510084873456,0.8746139363228549,-0.45033884520148393,-0.08407689310182231 +0.0,0.0,0.0,-1.1597219950715139,-0.08143932909845428,-1.1751893458813112,-0.7674199500925992 +0.0,0.0,1.0,-1.1236301594543658,1.428118458408877,-0.8127640955413976,0.040167299078318945 +1.0,0.0,1.0,-0.14915059779134784,0.6733395646552114,-0.667793995405432,-0.14619898919189295 +0.0,1.0,0.0,-1.3221352553486831,1.0758883079905002,-0.5953089453374494,-0.9537862383628111 +0.0,0.0,1.0,-1.0514464882200674,0.47206519298756794,-1.1751893458813112,-0.33256527746210485 +1.0,0.0,1.0,-0.8709873101343234,1.9816229804948995,-0.3778537951335012,-0.08407689310182231 +0.0,0.0,0.0,0.6268238679773505,-1.5909971166057857,0.7819070059542225,0.8166935002042018 +1.0,0.0,1.0,0.9336044707231156,0.522383785904478,-0.45033884520148393,0.22653358734853082 +1.0,0.0,1.0,1.3125687447031766,1.0255697150735885,-0.5953089453374494,-0.7052978540025285 +0.0,0.0,0.0,0.9155585529145409,-1.3394041520212305,0.7819070059542225,0.5060830197538486 +0.0,1.0,1.0,-0.8890332279428981,0.7739767504890331,-1.465129546153242,-0.5810536618223874 +0.0,1.0,1.0,-0.6183444608142823,0.9249325292397667,-0.160398644929553,-0.2704431813720342 +0.0,1.0,0.0,-0.9070791457514727,-0.031120736181542513,-0.7402790454734148,-1.4507630070833761 +0.0,1.0,1.0,0.32004326523158527,0.8746139363228549,-0.3053687450655184,-0.08407689310182231 +1.0,0.0,0.0,-1.8093750361801924,-0.031120736181542513,-1.1751893458813112,-1.0159083344528816 +0.0,1.0,1.0,-1.6108699402858737,1.12620690090741,-0.5953089453374494,-0.02195479701175168 +0.0,0.0,1.0,1.0779718131917102,-0.6349438511844756,1.6517276067700153,1.4068534130598727 +0.0,0.0,0.0,0.2659055118058626,-1.741952895356519,0.926877106090188,0.537144067798884 +0.0,0.0,1.0,-0.4739771183456876,0.7236581575721232,-0.7402790454734148,-0.643175757912458 +0.0,0.0,1.0,0.5005024433173292,-0.534306665350653,0.9993621561581707,1.5932197013300846 +0.0,0.0,0.0,-0.7988036389000261,1.7803486088272542,-0.7402790454734148,-0.3946873735521754 +1.0,0.0,1.0,0.8975126351059662,1.176525493824322,0.636936905818257,-0.33256527746210485 +0.0,0.0,1.0,1.0779718131917102,-0.43366947951683127,2.0866379071779115,1.8417080856903671 +0.0,0.0,1.0,0.7350993748287971,-1.0374925945197644,0.5644518557502743,1.5932197013300846 +1.0,0.0,0.0,-1.5206403512430018,0.17015363548610096,-0.7402790454734148,-1.2954577668581995 +1.0,0.0,1.0,-0.6183444608142823,0.01919785673536746,-1.0302192457453458,-0.9227251903177758 +1.0,0.0,0.0,-1.4484566800087044,0.3714280071537444,-0.8127640955413976,-0.9537862383628111 +0.0,0.0,0.0,-0.040875090939902534,-1.6413157095226967,0.4919668056822916,0.10228939516838957 +0.0,0.0,0.0,-0.22133426902564643,-1.490359930771964,0.5644518557502743,0.5992661638889546 +1.0,0.0,0.0,-1.2679975019229606,-0.3330322936830095,-1.1751893458813112,-1.0159083344528816 +0.0,0.0,1.0,1.4569360871717727,-0.08143932909845428,2.0866379071779115,1.6553417974201552 +1.0,0.0,0.0,-0.0950128443656252,0.47206519298756794,0.05705650527439521,-1.0159083344528816 +1.0,0.0,0.0,0.644869785785925,0.5727023788213897,-0.45033884520148393,-0.45680946964224606 +0.0,1.0,0.0,-1.7010995293287456,0.01919785673536746,-0.8852491456093803,-1.2643967188131642 +0.0,0.0,1.0,-0.2393801868342198,0.5727023788213897,-0.3778537951335012,-0.17726003723692826 +1.0,0.0,0.0,-0.3296097758770917,0.6733395646552114,-1.5376145962212249,-0.8295420461826698 +0.0,0.0,0.0,-0.2393801868342198,-1.741952895356519,0.4919668056822916,-0.33256527746210485 +0.0,0.0,0.0,0.8072830460630943,-1.0878111874366752,1.2893023564301016,0.7856324521591664 +0.0,0.0,0.0,-0.5642067073885596,-1.741952895356519,0.926877106090188,0.537144067798884 +0.0,0.0,1.0,0.7892371282545196,-0.43366947951683127,1.3617874064980844,1.4689755091499435 +0.0,0.0,1.0,1.9983136214290043,-0.5846252582675647,2.0866379071779115,2.028074373960579 +0.0,1.0,0.0,-1.5386862690515763,0.17015363548610096,-0.8127640955413976,-0.643175757912458 +1.0,0.0,1.0,1.1682014022345821,1.2268440867412336,-0.015428544793587521,-0.20832108528196355 +0.0,0.0,0.0,0.7531452926373716,-1.4400413378550523,0.636936905818257,0.47502197170881333 +1.0,0.0,1.0,-0.455931200537113,0.6733395646552114,-0.015428544793587521,-0.2704431813720342 +0.0,0.0,1.0,0.9877422241488382,-0.48398807243374303,2.014152857109929,1.9659522778705083 +0.0,0.0,0.0,0.6629157035944997,-1.0878111874366752,1.0718472062261535,0.6613882599790252 +0.0,0.0,1.0,1.0057881419574128,-1.0878111874366752,1.0718472062261535,0.6613882599790252 +0.0,1.0,1.0,-0.2754720224513691,1.7803486088272542,-0.3053687450655184,0.35077777952867206 +1.0,0.0,1.0,-1.2319056663058112,0.47206519298756794,-1.6825846963571904,-0.3946873735521754 +0.0,0.0,1.0,1.2223391556603047,-0.7355810370182982,1.7966977069059809,1.220487124789661 +0.0,0.0,1.0,1.1140636488088596,-1.4400413378550523,1.2168173063621188,1.8417080856903671 +1.0,0.0,1.0,1.348660580320326,0.7739767504890331,-1.0302192457453458,-1.2022746227230936 +0.0,0.0,0.0,-1.6289158580944483,0.3714280071537444,-0.8127640955413976,-0.9537862383628111 +1.0,0.0,1.0,1.0779718131917102,1.176525493824322,-0.3778537951335012,-0.3946873735521754 +0.0,1.0,0.0,-0.6724822142400062,0.4217466000706562,-0.45033884520148393,-1.2022746227230936 +1.0,0.0,1.0,-0.9070791457514727,0.7739767504890331,-1.1751893458813112,-0.7052978540025285 +0.0,1.0,0.0,-0.7988036389000261,0.01919785673536746,-0.3778537951335012,-0.8295420461826698 +0.0,1.0,1.0,-0.1671965155999225,1.0255697150735885,-0.3053687450655184,-0.8916641422727405 +1.0,0.0,1.0,1.4208442515546233,1.176525493824322,0.3469967055463261,-0.33256527746210485 +0.0,0.0,1.0,-1.1416760772629393,0.7739767504890331,-1.5376145962212249,-0.7674199500925992 +1.0,0.0,1.0,-0.7988036389000261,0.8242953434059449,-0.8127640955413976,0.47502197170881333 +0.0,0.0,1.0,0.17567592276299066,-0.8865368157690309,1.3617874064980844,1.034120836519449 +0.0,0.0,1.0,1.8539462789604084,-0.7355810370182982,2.1591229572458945,1.7795859896002966 +1.0,0.0,1.0,1.5652115940232192,1.3274812725750553,-0.3053687450655184,-0.6121147098674227 +0.0,0.0,1.0,0.9696963063402636,-0.6852624441013865,1.0718472062261535,0.8788155962942724 +0.0,0.0,1.0,1.348660580320326,-0.43366947951683127,2.0866379071779115,1.5932197013300846 +0.0,0.0,1.0,1.4749820049803473,-0.031120736181542513,1.9416678070419462,1.4689755091499435 +0.0,0.0,1.0,-0.4378852827285383,0.4217466000706562,-0.667793995405432,-0.33256527746210485 +0.0,0.0,0.0,-0.13110467998277447,-1.8929086741072518,0.5644518557502743,0.22653358734853082 +1.0,0.0,1.0,1.438890169363198,0.9249325292397667,-0.3053687450655184,-0.08407689310182231 +0.0,0.0,1.0,0.7892371282545196,-1.2890855591043195,0.8543920560222052,2.028074373960579 +0.0,0.0,0.0,0.6268238679773505,-1.490359930771964,0.5644518557502743,0.47502197170881333 +0.0,1.0,0.0,-0.943170981368622,0.22047222840301273,-0.7402790454734148,-1.1712135746780583 +0.0,1.0,0.0,-1.8996046252230643,0.9249325292397667,-0.8127640955413976,-0.7674199500925992 +0.0,0.0,0.0,-0.004783255322753243,-1.79227148827343,0.4919668056822916,0.1644114912584602 +0.0,0.0,0.0,0.22981367618871332,-1.6916343024396074,0.4919668056822916,-0.02195479701175168 +0.0,0.0,1.0,0.39222693646588386,-1.1381297803535861,1.4342724565660672,1.344731316969802 +0.0,0.0,0.0,-0.365701611494241,-1.8425900811903408,0.636936905818257,-0.08407689310182231 +0.0,0.0,0.0,-0.4198393649199637,-1.2387669661874088,0.636936905818257,0.5992661638889546 +1.0,0.0,0.0,-1.376273008774407,-0.08143932909845428,-0.45033884520148393,-1.1090914785879877 +1.0,0.0,1.0,0.8975126351059662,1.2268440867412336,0.7819070059542225,0.10228939516838957 +1.0,0.0,0.0,-1.4484566800087044,0.3211094142368345,-0.45033884520148393,-0.9537862383628111 +0.0,0.0,1.0,-1.1597219950715139,0.9752511221566784,-0.5228238952694666,-0.5810536618223874 +1.0,0.0,1.0,1.2403850734688795,0.9752511221566784,-0.3778537951335012,-0.8295420461826698 +0.0,0.0,1.0,0.4824565255087558,-0.9368554086859417,1.2893023564301016,1.220487124789661 +0.0,0.0,1.0,0.28395142961443726,1.5790742371596107,-0.7402790454734148,0.47502197170881333 +0.0,0.0,1.0,-0.5281148717714103,0.9752511221566784,-0.9577341956773631,-0.14619898919189295 +0.0,0.0,1.0,0.861420799488817,-0.48398807243374303,1.5067575066340497,2.214440662230791 +0.0,1.0,0.0,-0.9612168991771954,0.9249325292397667,-0.45033884520148393,-0.9537862383628111 +0.0,1.0,1.0,-0.4739771183456876,0.6733395646552114,0.05705650527439521,-0.42574842159721077 +0.0,0.0,0.0,0.21176775838013995,-1.6916343024396074,0.9993621561581707,0.6613882599790252 +0.0,0.0,0.0,-1.376273008774407,-0.031120736181542513,-1.247674395949294,-1.6992513914436587 +1.0,0.0,0.0,0.4283187720830319,0.7236581575721232,-0.8127640955413976,-0.9537862383628111 +0.0,1.0,1.0,-1.1416760772629393,1.3274812725750553,-0.23288369499753572,-0.8916641422727405 +1.0,0.0,1.0,1.5832575118317926,1.428118458408877,0.2745116554783434,0.4128998756187427 +0.0,0.0,1.0,1.0057881419574128,-0.5846252582675647,1.724212656837998,1.8417080856903671 +0.0,0.0,1.0,-0.14915059779134784,0.9249325292397667,-0.3053687450655184,0.6924493080240606 +0.0,0.0,0.0,-1.5386862690515763,-0.48398807243374303,-0.45033884520148393,-1.0780304305429524 +0.0,0.0,1.0,1.2764769090860286,-0.43366947951683127,1.3617874064980844,2.214440662230791 +0.0,0.0,0.0,0.4463646898916065,-1.3394041520212305,0.8543920560222052,0.22653358734853082 +0.0,0.0,0.0,0.4283187720830319,-1.0878111874366752,1.0718472062261535,0.5992661638889546 +1.0,0.0,1.0,1.3125687447031766,0.522383785904478,-0.3053687450655184,-0.5810536618223874 +1.0,0.0,0.0,0.21176775838013995,-0.28271370076609775,-0.7402790454734148,-1.2022746227230936 +0.0,0.0,0.0,-1.1416760772629393,-0.5846252582675647,-1.3201594460172767,-1.4197019590383408 +1.0,0.0,0.0,0.7350993748287971,-0.3833508865999213,-0.160398644929553,-1.1090914785879877 +0.0,0.0,1.0,0.825328963871669,-0.5846252582675647,2.0866379071779115,1.9659522778705083 +0.0,0.0,0.0,0.3019973474230119,-1.6413157095226967,0.926877106090188,0.22653358734853082 +1.0,0.0,0.0,1.0960177310002848,0.3714280071537444,-0.8127640955413976,-1.0159083344528816 +1.0,0.0,0.0,0.6268238679773505,-0.182076514932276,-0.160398644929553,-0.3946873735521754 +1.0,0.0,0.0,-0.14915059779134784,-0.28271370076609775,-1.0302192457453458,-1.637129295353588 +0.0,1.0,1.0,0.013262662485821404,0.4217466000706562,0.636936905818257,-0.2704431813720342 +1.0,0.0,1.0,1.709578936491814,1.3777998654919654,0.2745116554783434,0.35077777952867206 +1.0,0.0,0.0,-0.2754720224513691,0.06951644965227922,-1.0302192457453458,-1.0780304305429524 +0.0,0.0,0.0,-1.466502597817279,1.0255697150735885,-0.8852491456093803,-0.5189315657323167 +0.0,0.0,1.0,0.06740041591154407,0.06951644965227922,1.2893023564301016,1.2826092208797315 +0.0,0.0,0.0,-0.0950128443656252,-0.9871740016028535,0.8543920560222052,0.537144067798884 +0.0,0.0,0.0,-1.6289158580944483,0.3714280071537444,-0.667793995405432,-0.6121147098674227 +1.0,0.0,1.0,-0.6002985430057076,-0.08143932909845428,-0.8127640955413976,-0.6121147098674227 +1.0,0.0,0.0,0.2659055118058626,-0.08143932909845428,-0.3778537951335012,-0.8916641422727405 diff --git a/data/penguins_y_test.csv b/data/penguins_y_test.csv index a920166..43a4ec7 100644 --- a/data/penguins_y_test.csv +++ b/data/penguins_y_test.csv @@ -1,85 +1,85 @@ -,species -153,Chinstrap -154,Chinstrap -208,Chinstrap -304,Gentoo -283,Gentoo -317,Gentoo -133,Adelie -149,Adelie -250,Gentoo -55,Adelie -23,Adelie -225,Gentoo -83,Adelie -343,Gentoo -276,Gentoo -52,Adelie -81,Adelie -27,Adelie -183,Chinstrap -189,Chinstrap -287,Gentoo -227,Gentoo -330,Gentoo -318,Gentoo -209,Chinstrap -146,Adelie -228,Gentoo -142,Adelie -165,Chinstrap -314,Gentoo -182,Chinstrap -22,Adelie -68,Adelie -57,Adelie -16,Adelie -329,Gentoo -179,Chinstrap -6,Adelie -46,Adelie -105,Adelie -4,Adelie -205,Chinstrap -79,Adelie -211,Chinstrap -87,Adelie -73,Adelie -327,Gentoo -144,Adelie -218,Chinstrap -260,Gentoo -290,Gentoo -300,Gentoo -325,Gentoo -63,Adelie -64,Adelie -288,Gentoo -338,Gentoo -258,Gentoo -297,Gentoo -265,Gentoo -53,Adelie -174,Chinstrap -119,Adelie -247,Gentoo -200,Chinstrap -150,Adelie -270,Gentoo -191,Chinstrap -123,Adelie -58,Adelie -199,Chinstrap -66,Adelie -186,Chinstrap -37,Adelie -17,Adelie -15,Adelie -92,Adelie -65,Adelie -25,Adelie -285,Gentoo -263,Gentoo -319,Gentoo -274,Gentoo -106,Adelie +species +Adelie +Adelie +Chinstrap +Adelie +Adelie +Adelie +Adelie +Adelie +Adelie +Gentoo +Gentoo +Gentoo +Gentoo +Adelie +Gentoo +Gentoo +Gentoo +Gentoo +Chinstrap +Adelie +Gentoo +Adelie +Gentoo +Adelie +Chinstrap +Adelie +Gentoo +Adelie +Adelie +Adelie +Gentoo +Adelie +Gentoo +Adelie +Adelie +Chinstrap +Gentoo +Adelie +Chinstrap +Chinstrap +Chinstrap +Adelie +Adelie +Gentoo +Gentoo +Chinstrap +Chinstrap +Chinstrap +Chinstrap +Adelie +Gentoo +Adelie +Chinstrap +Chinstrap +Gentoo +Chinstrap +Adelie +Gentoo +Chinstrap +Gentoo +Adelie +Gentoo +Adelie +Gentoo +Adelie +Gentoo +Adelie +Gentoo +Adelie +Adelie +Gentoo +Gentoo +Gentoo +Gentoo +Adelie +Chinstrap +Gentoo +Adelie +Adelie +Adelie +Adelie +Chinstrap +Gentoo +Adelie diff --git a/data/penguins_y_train.csv b/data/penguins_y_train.csv index f550b61..c50aba3 100644 --- a/data/penguins_y_train.csv +++ b/data/penguins_y_train.csv @@ -1,250 +1,250 @@ -,species -168,Chinstrap -62,Adelie -284,Gentoo -135,Adelie -51,Adelie -233,Gentoo -201,Chinstrap -114,Adelie -254,Gentoo -121,Adelie -39,Adelie -187,Chinstrap -80,Adelie -160,Chinstrap -93,Adelie -112,Adelie -207,Chinstrap -256,Gentoo -138,Adelie -332,Gentoo -163,Chinstrap -302,Gentoo -77,Adelie -107,Adelie -0,Adelie -206,Chinstrap -117,Adelie -237,Gentoo -28,Adelie -131,Adelie -242,Gentoo -26,Adelie -7,Adelie -224,Gentoo -61,Adelie -164,Chinstrap -267,Gentoo -156,Chinstrap -303,Gentoo -268,Gentoo -214,Chinstrap -32,Adelie -175,Chinstrap -14,Adelie -184,Chinstrap -95,Adelie -296,Gentoo -82,Adelie -78,Adelie -40,Adelie -341,Gentoo -294,Gentoo -277,Gentoo -234,Gentoo -110,Adelie -293,Gentoo -266,Gentoo -147,Adelie -98,Adelie -271,Gentoo -90,Adelie -299,Gentoo -236,Gentoo -111,Adelie -151,Adelie -333,Gentoo -180,Chinstrap -231,Gentoo -337,Gentoo -155,Chinstrap -101,Adelie -269,Gentoo -33,Adelie -210,Chinstrap -320,Gentoo -115,Adelie -48,Adelie -177,Chinstrap -243,Gentoo -279,Gentoo -217,Chinstrap -116,Adelie -159,Chinstrap -132,Adelie -181,Chinstrap -169,Chinstrap -30,Adelie -162,Chinstrap -272,Gentoo -196,Chinstrap -97,Adelie -1,Adelie -94,Adelie -219,Chinstrap -203,Chinstrap -49,Adelie -192,Chinstrap -280,Gentoo -161,Chinstrap -108,Adelie -215,Chinstrap -71,Adelie -245,Gentoo -251,Gentoo -226,Gentoo -197,Chinstrap -38,Adelie -171,Chinstrap -72,Adelie -125,Adelie -311,Gentoo -188,Chinstrap -291,Gentoo -309,Gentoo -257,Gentoo -88,Adelie -253,Gentoo -118,Adelie -60,Adelie -331,Gentoo -84,Adelie -157,Chinstrap -213,Chinstrap -29,Adelie -42,Adelie -248,Gentoo -19,Adelie -100,Adelie -173,Chinstrap -130,Adelie -139,Adelie -136,Adelie -128,Adelie -176,Chinstrap -76,Adelie -229,Gentoo -127,Adelie -308,Gentoo -166,Chinstrap -137,Adelie -312,Gentoo -85,Adelie -99,Adelie -54,Adelie -74,Adelie -158,Chinstrap -334,Gentoo -43,Adelie -167,Chinstrap -140,Adelie -36,Adelie -198,Chinstrap -202,Chinstrap -126,Adelie -315,Gentoo -190,Chinstrap -69,Adelie -194,Chinstrap -24,Adelie -45,Adelie -2,Adelie -241,Gentoo -264,Gentoo -75,Adelie -261,Gentoo -313,Gentoo -306,Gentoo -240,Gentoo -86,Adelie -342,Gentoo -34,Adelie -195,Chinstrap -124,Adelie -216,Chinstrap -185,Chinstrap -148,Adelie -289,Gentoo -59,Adelie -103,Adelie -50,Adelie -204,Chinstrap -221,Gentoo -326,Gentoo -172,Chinstrap -238,Gentoo -13,Adelie -178,Chinstrap -96,Adelie -307,Gentoo -102,Adelie -5,Adelie -275,Gentoo -35,Adelie -143,Adelie -91,Adelie -262,Gentoo -281,Gentoo -301,Gentoo -21,Adelie -255,Gentoo -328,Gentoo -134,Adelie -20,Adelie -220,Gentoo -278,Gentoo -244,Gentoo -310,Gentoo -282,Gentoo -249,Gentoo -322,Gentoo -18,Adelie -67,Adelie -239,Gentoo -141,Adelie -212,Chinstrap -273,Gentoo -230,Gentoo -109,Adelie -113,Adelie -56,Adelie -252,Gentoo -292,Gentoo -340,Gentoo -232,Gentoo -70,Adelie -12,Adelie -41,Adelie -235,Gentoo -145,Adelie -31,Adelie -298,Gentoo -259,Gentoo -316,Gentoo -222,Gentoo -295,Gentoo -122,Adelie -223,Gentoo -321,Gentoo -193,Chinstrap -305,Gentoo -104,Adelie -44,Adelie -120,Adelie -152,Chinstrap -323,Gentoo -89,Adelie -335,Gentoo -129,Adelie -170,Chinstrap +species +Gentoo +Adelie +Chinstrap +Adelie +Chinstrap +Adelie +Chinstrap +Gentoo +Adelie +Adelie +Adelie +Gentoo +Adelie +Gentoo +Adelie +Adelie +Gentoo +Adelie +Gentoo +Adelie +Adelie +Adelie +Gentoo +Gentoo +Adelie +Chinstrap +Gentoo +Gentoo +Adelie +Adelie +Adelie +Gentoo +Adelie +Chinstrap +Chinstrap +Chinstrap +Adelie +Gentoo +Adelie +Gentoo +Gentoo +Adelie +Adelie +Adelie +Adelie +Adelie +Adelie +Chinstrap +Adelie +Chinstrap +Adelie +Gentoo +Adelie +Chinstrap +Adelie +Adelie +Chinstrap +Adelie +Chinstrap +Adelie +Adelie +Chinstrap +Adelie +Chinstrap +Gentoo +Adelie +Adelie +Adelie +Gentoo +Adelie +Gentoo +Adelie +Gentoo +Gentoo +Chinstrap +Chinstrap +Chinstrap +Adelie +Gentoo +Adelie +Gentoo +Gentoo +Chinstrap +Adelie +Adelie +Gentoo +Gentoo +Gentoo +Adelie +Gentoo +Adelie +Chinstrap +Gentoo +Gentoo +Gentoo +Gentoo +Gentoo +Gentoo +Gentoo +Gentoo +Chinstrap +Chinstrap +Gentoo +Gentoo +Gentoo +Gentoo +Adelie +Chinstrap +Gentoo +Gentoo +Gentoo +Adelie +Adelie +Gentoo +Gentoo +Chinstrap +Chinstrap +Adelie +Adelie +Adelie +Adelie +Chinstrap +Adelie +Chinstrap +Adelie +Adelie +Adelie +Adelie +Chinstrap +Adelie +Adelie +Adelie +Adelie +Adelie +Adelie +Gentoo +Chinstrap +Chinstrap +Gentoo +Adelie +Adelie +Adelie +Adelie +Adelie +Adelie +Gentoo +Gentoo +Adelie +Gentoo +Adelie +Chinstrap +Gentoo +Gentoo +Adelie +Adelie +Adelie +Gentoo +Gentoo +Adelie +Gentoo +Chinstrap +Chinstrap +Adelie +Adelie +Adelie +Gentoo +Gentoo +Gentoo +Gentoo +Gentoo +Adelie +Chinstrap +Gentoo +Adelie +Gentoo +Gentoo +Gentoo +Adelie +Adelie +Gentoo +Gentoo +Chinstrap +Adelie +Chinstrap +Adelie +Adelie +Adelie +Adelie +Chinstrap +Adelie +Adelie +Gentoo +Gentoo +Chinstrap +Gentoo +Gentoo +Gentoo +Adelie +Gentoo +Chinstrap +Gentoo +Gentoo +Adelie +Adelie +Gentoo +Gentoo +Gentoo +Gentoo +Gentoo +Adelie +Chinstrap +Adelie +Adelie +Chinstrap +Gentoo +Adelie +Adelie +Gentoo +Adelie +Adelie +Gentoo +Adelie +Chinstrap +Adelie +Chinstrap +Gentoo +Adelie +Adelie +Gentoo +Gentoo +Gentoo +Chinstrap +Chinstrap +Adelie +Chinstrap +Gentoo +Gentoo +Chinstrap +Chinstrap +Chinstrap +Adelie +Chinstrap +Chinstrap +Adelie +Gentoo +Gentoo +Adelie +Adelie +Chinstrap diff --git a/lessons/01_regression.ipynb b/lessons/01_regression.ipynb index b5631b0..bdbdac6 100644 --- a/lessons/01_regression.ipynb +++ b/lessons/01_regression.ipynb @@ -137,7 +137,7 @@ "metadata": {}, "outputs": [], "source": [ - "data.corr()" + "data.corr(numeric_only=True)" ] }, { @@ -419,8 +419,8 @@ "metadata": {}, "outputs": [], "source": [ - "# Import the mean squared error function\n", - "from sklearn.metrics import mean_squared_error" + "# Import the MSE and RMSE functions - if this doesn't work, update your scikit-learn version!\n", + "from sklearn.metrics import mean_squared_error, root_mean_squared_error" ] }, { @@ -440,7 +440,7 @@ "metadata": {}, "outputs": [], "source": [ - "print(f'Train RMSE: {mean_squared_error(y_train, y_train_pred, squared=False)}')" + "print(f'Train RMSE: {root_mean_squared_error(y_train, y_train_pred)}')" ] }, { @@ -449,7 +449,7 @@ "metadata": {}, "outputs": [], "source": [ - "print(f'Test RMSE: {mean_squared_error(y_test, y_test_pred, squared=False)}')" + "print(f'Test RMSE: {root_mean_squared_error(y_test, y_test_pred)}')" ] }, { @@ -623,8 +623,8 @@ " knn_train_pred = knn_reg.predict(X_train)\n", " knn_test_pred = knn_reg.predict(X_test)\n", " # Print summary\n", - " print(f'K={K}: Train RMSE = {mean_squared_error(y_train, knn_train_pred, squared=False):0.4f}; '\n", - " f'Test RMSE: {mean_squared_error(y_test, knn_test_pred, squared=False):0.4f}')\n" + " print(f'K={K}: Train RMSE = {root_mean_squared_error(y_train, knn_train_pred):0.4f}; '\n", + " f'Test RMSE: {root_mean_squared_error(y_test, knn_test_pred):0.4f}')\n" ] }, { @@ -650,7 +650,7 @@ "anaconda-cloud": {}, "hide_input": false, "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -664,7 +664,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.12" + "version": "3.11.6" }, "toc": { "base_numbering": 1, diff --git a/lessons/02_regularization.ipynb b/lessons/02_regularization.ipynb index 93e2f44..da68cf7 100644 --- a/lessons/02_regularization.ipynb +++ b/lessons/02_regularization.ipynb @@ -64,7 +64,8 @@ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "\n", - "from sklearn.metrics import mean_squared_error\n", + "# If this doesn't work, update your scikit-learn version!\n", + "from sklearn.metrics import mean_squared_error, root_mean_squared_error\n", "from sklearn.model_selection import train_test_split" ] }, @@ -125,7 +126,7 @@ "\n", "Why does ridge regression serve as a good regularizer? The penalty actually does several things, which are beneficial for our model:\n", "1. **Multicollinearity:** Ridge regression was devised largely to combat multicollinearity, or when features are highly correlated with each other. Ordinary least squares struggles in these scenarios, because multicollinearity can cause a huge increase in variance: it makes the parameter estimates unstable. Adding the penalty term stabilizes the parameter estimates, at a little cost to bias. This results in better generalization performance.\n", - "2. **Low Number of Samples:** The most common scenario where you might overfit is when you have many features, but not many samples. Adding the penalty term stabilizes the model in these scenarios. There's not a great intuition for this without diving into the math, so you can just take it at face value. \n", + "2. **Low Number of Samples:** The most common scenario where you might overfit is when you have many features, but not many samples. Adding the penalty term stabilizes the model in these scenarios. The idea here is that when sample sizes are low, there is a higher probability of encountering unlikely samples, and thus the parameter estimates can fluctuate more. By applying regularization, we prevent the model from fitting too closely to any anomalies, making it more robust.\n", "3. **Shrinkage:** The $\\ell_2$ penalty results in shrinkage, or a small reduction in the size of the parameters. This is effectively a bias, but helps regularize by reducing variance that often comes with overfit models." ] }, @@ -178,8 +179,8 @@ "# Evaluate model\n", "print(f'Training R^2: {ridge.score(X_train, y_train)}')\n", "print(f'Test R^2: {ridge.score(X_test, y_test)}')\n", - "print(f'Train RMSE: {mean_squared_error(y_train, y_train_pred_ridge, squared=False)}')\n", - "print(f'Test RMSE: {mean_squared_error(y_test, y_test_pred_ridge, squared=False)}')" + "print(f'Train RMSE: {root_mean_squared_error(y_train, y_train_pred_ridge)}')\n", + "print(f'Test RMSE: {root_mean_squared_error(y_test, y_test_pred_ridge)}')" ] }, { @@ -369,7 +370,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -383,7 +384,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.12" + "version": "3.11.6" } }, "nbformat": 4, diff --git a/lessons/03_preprocessing.ipynb b/lessons/03_preprocessing.ipynb index 6465fb4..b51ef75 100644 --- a/lessons/03_preprocessing.ipynb +++ b/lessons/03_preprocessing.ipynb @@ -27,6 +27,7 @@ "source": [ "For today, we will be working with the `penguins` data set. This data set is from [Kaggle](https://www.kaggle.com/parulpandey/penguin-dataset-the-new-iris) and includes some penguins of three different species, their location, and some measurements for each penguin.\n", "\n", + "\n", "First, let's import some packages we'll need." ] }, @@ -75,7 +76,7 @@ "source": [ "Below is the information for each of the columns:\n", "1. **species**: Species of penguin [Adelie, Chinstrap, Gentoo]\n", - "2. **island**: Island where the penguin was found [Torgersen, Biscoe]\n", + "2. **island**: Island where the penguin was found [Torgersen, Biscoe, Dream]\n", "3. **culmen_length_mm**: Length of upper part of penguin's bill (millimeters)\n", "4. **culmen_depth_mm**: Height of upper part of bill (millimeters)\n", "5. **flipper_length_mm**: Length of penguin flipper (millimeters)\n", @@ -85,6 +86,7 @@ "\n", "**Question:** Which of the columns are continuous? Which are categorical?\n", "\n", + "**Our main goal will be to predict the species of the penguins from the other features. To get to this point (notebook 4), we will need to carry out preprocessing on the data.**\n", "\n", "We will need to treat the numeric and categorical data differently in preprocessing.\n" ] @@ -175,7 +177,7 @@ "from sklearn.impute import SimpleImputer\n", "\n", "imputer = SimpleImputer(missing_values=np.nan,\n", - " strategy='mean', \n", + " strategy='mean',\n", " copy=True)\n", "imputed = imputer.fit_transform(data[['body_mass_g','flipper_length_mm']])\n" ] @@ -192,9 +194,7 @@ "cell_type": "code", "execution_count": null, "id": "bc7157f2", - "metadata": { - "scrolled": false - }, + "metadata": {}, "outputs": [], "source": [ "print(imputed[data[data['body_mass_g'].isna()].index])" @@ -223,7 +223,7 @@ "metadata": {}, "outputs": [], "source": [ - "data = data.dropna(subset='sex')\n", + "data = data.dropna(subset=['sex'])\n", "\n", "# Now this line will return an empty dataframe\n", "data[data['sex'].isna()]" @@ -290,7 +290,7 @@ "outputs": [], "source": [ "from sklearn.preprocessing import OneHotEncoder\n", - "dummy_e = OneHotEncoder(categories='auto', drop='first', sparse=False)\n", + "dummy_e = OneHotEncoder(categories='auto', drop='first', sparse_output=False)\n", "dummy_e.fit(data_cat);\n", "dummy_e.categories_" ] @@ -357,7 +357,7 @@ "source": [ "from sklearn.preprocessing import StandardScaler\n", "norm_e = StandardScaler()\n", - "norm_e.fit_transform(data_num,).mean(axis=0)\n" + "norm_e.fit_transform(data_num,).mean(axis=0)" ] }, { @@ -377,8 +377,8 @@ "metadata": {}, "outputs": [], "source": [ - "print('mean:',norm_e.fit_transform(data_num,).mean(axis=0))\n", - "print('std:',norm_e.fit_transform(data_num,).std(axis=0))" + "print('mean:', norm_e.fit_transform(data_num,).mean(axis=0))\n", + "print('std:', norm_e.fit_transform(data_num,).std(axis=0))" ] }, { @@ -392,10 +392,10 @@ "The simple imputer, normalization and one-hot-encoding rely on sklearn functions that are fit to a data set. \n", "\n", "1) What is being fit for each of the three functions?\n", - " 1) One Hot Encoding\n", - " 2) Standard Scaler\n", - " 3) Simple Imputer\n", - " \n", + " - One Hot Encoding\n", + " - Standard Scaler\n", + " - Simple Imputer\n", + "\n", "*YOUR ANSWER HERE*\n", "\n", "When we are preprocessing data we have a few options: \n", @@ -431,7 +431,7 @@ "source": [ "data = pd.read_csv('../data/penguins.csv')\n", "data.replace('.', np.nan, inplace=True)\n", - "data = data.dropna(subset='sex')\n" + "data = data.dropna(subset=['sex'])" ] }, { @@ -445,7 +445,7 @@ "y = data['species']\n", "X = data.drop('species', axis =1, inplace=False)\n", "X_train, X_test, y_train, y_test=train_test_split(X, y, test_size=.25, stratify=y)\n", - "print(X_train.shape)\n" + "print(X_train.shape)" ] }, { @@ -505,7 +505,6 @@ "X_train_dummy = dummy_e.fit_transform(X_train_cat)\n", "X_test_dummy = dummy_e.transform(X_test_cat)\n", "\n", - "\n", "# Check the shape\n", "X_train_dummy.shape, X_test_dummy.shape" ] @@ -623,18 +622,18 @@ "X_test = pd.DataFrame(X_test)\n", "\n", "X_test.columns = ['Dream','Torgersen', 'Male',\n", - " 'culmen_length_mm', 'culmen_depth_mm',\n", - " 'flipper_length_mm', 'body_mass_g']\n", + " 'culmen_length_mm', 'culmen_depth_mm',\n", + " 'flipper_length_mm', 'body_mass_g']\n", "y_train = pd.DataFrame(y_train)\n", "y_train.columns = ['species']\n", "\n", "y_test = pd.DataFrame(y_test)\n", "y_test.columns = ['species']\n", "\n", - "X_train.to_csv('../data/penguins_X_train.csv')\n", - "X_test.to_csv('../data/penguins_X_test.csv')\n", - "y_train.to_csv('../data/penguins_y_train.csv')\n", - "y_test.to_csv('../data/penguins_y_test.csv')\n" + "X_train.to_csv('../data/penguins_X_train.csv', index=False)\n", + "X_test.to_csv('../data/penguins_X_test.csv', index=False)\n", + "y_train.to_csv('../data/penguins_y_train.csv', index=False)\n", + "y_test.to_csv('../data/penguins_y_test.csv', index=False)" ] }, { @@ -659,21 +658,11 @@ "\n", "---" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "b0895317", - "metadata": {}, - "outputs": [], - "source": [ - "# YOUR CODE HERE" - ] } ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -687,7 +676,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.12" + "version": "3.11.6" } }, "nbformat": 4, diff --git a/lessons/04_classification.ipynb b/lessons/04_classification.ipynb index 5b7b0b7..ef22823 100644 --- a/lessons/04_classification.ipynb +++ b/lessons/04_classification.ipynb @@ -24,15 +24,10 @@ "outputs": [], "source": [ "import pandas as pd\n", - "import numpy as np\n", "import matplotlib.pyplot as plt\n", "import seaborn as sb\n", "\n", - "from sklearn.tree import DecisionTreeClassifier, plot_tree\n", - "from sklearn.linear_model import LogisticRegression\n", - "from sklearn.preprocessing import OneHotEncoder, StandardScaler\n", - "from sklearn.model_selection import train_test_split, cross_val_score, KFold\n", - "from sklearn.metrics import classification_report, confusion_matrix, accuracy_score, recall_score, precision_score, f1_score" + "from sklearn.tree import DecisionTreeClassifier, plot_tree" ] }, { @@ -77,10 +72,10 @@ "metadata": {}, "outputs": [], "source": [ - "X_train = X_train[y_train['species'].isin(['Adelie','Gentoo'])].reset_index()\n", - "X_test = X_test[y_test['species'].isin(['Adelie','Gentoo'])].reset_index()\n", - "y_train = y_train[y_train['species'].isin(['Adelie','Gentoo'])].reset_index()\n", - "y_test = y_test[y_test['species'].isin(['Adelie','Gentoo'])].reset_index()" + "X_train = X_train[y_train['species'].isin(['Adelie', 'Gentoo'])].reset_index()\n", + "X_test = X_test[y_test['species'].isin(['Adelie', 'Gentoo'])].reset_index()\n", + "y_train = y_train[y_train['species'].isin(['Adelie', 'Gentoo'])].reset_index()\n", + "y_test = y_test[y_test['species'].isin(['Adelie', 'Gentoo'])].reset_index()" ] }, { @@ -102,7 +97,7 @@ }, "outputs": [], "source": [ - "y_train.value_counts('species')/sum(y_train.value_counts('species'))" + "y_train.value_counts('species') / sum(y_train.value_counts('species'))" ] }, { @@ -136,10 +131,12 @@ }, "outputs": [], "source": [ - "sb.histplot(data=X_train.loc[y_train['species'].isin(['Adelie','Gentoo'])],\n", - " x = 'body_mass_g',\n", - " hue = y_train['species'],kde=True,bins=20)\n", - "#plt.axvline(.28,color= 'red')" + "sb.histplot(data=X_train,\n", + " x='body_mass_g',\n", + " hue=y_train['species'],\n", + " stat='density',\n", + " bins=20,\n", + " palette={'Adelie':'C0', 'Gentoo':'C1'})" ] }, { @@ -157,10 +154,12 @@ "metadata": {}, "outputs": [], "source": [ - "sb.histplot(data=X_test.loc[y_test['species'].isin(['Gentoo','Adelie'])],\n", - " x = 'body_mass_g',\n", - " hue = y_test['species'],kde=True,bins=20)\n", - "#plt.axvline(.28,color= 'red')" + "sb.histplot(data=X_test,\n", + " x='body_mass_g',\n", + " hue=y_test['species'],\n", + " stat='density',\n", + " bins=20,\n", + " palette={'Adelie':'C0', 'Gentoo':'C1'})" ] }, { @@ -174,7 +173,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Now let's figure out how to separate out these groups mathematically. For this, we will start by using an algorithm called Logistic Regression." + "Now, let's figure out how to separate out these groups mathematically. For this, we will start by using an algorithm called Logistic Regression." ] }, { @@ -186,7 +185,7 @@ "Logistic regression is a supervised classification algorithm that is used to predict a binary outcome. Similar to linear regression, this model uses coefficients or betas to make its predictions. However unlike a linear regression, its predictions range from 0 to 1, where 0 and 1 stand for 'confidently class A and B' respectively. Predictions along the middle of the line show less confidence in the prediction.\n", "\n", "The function for the logistic regression is:\n", - "$$ p(x) = \\frac{1}{1 + e^{(-\\beta_0+\\beta_1x_1...)}}$$\n", + "$$ p(x) = \\frac{1}{1 + e^{(-\\beta_0+\\beta_1x_1 + \\cdots +\\beta_P x_P)}}$$\n", "\n", "where $\\beta$ are the learned parameters and $x$ are the input features.\n" ] @@ -216,6 +215,16 @@ "3. Evaluate on training and testing datasets" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from sklearn.linear_model import LogisticRegression\n", + "from sklearn.metrics import confusion_matrix" + ] + }, { "cell_type": "code", "execution_count": null, @@ -226,13 +235,13 @@ "lr = LogisticRegression(max_iter=170)\n", "\n", "#2) Fit model\n", - "lr.fit(X_train['body_mass_g'].values.reshape(-1, 1), y_train['species'])\n", + "lr.fit(X_train[['body_mass_g']], y_train['species'])\n", "\n", "#3) Evaluate \n", - "train_score = lr.score(X_train['body_mass_g'].values.reshape(-1, 1), y_train['species'])\n", - "test_score = lr.score(X_test['body_mass_g'].values.reshape(-1, 1), y_test['species'])\n", + "train_score = lr.score(X_train[['body_mass_g']], y_train['species'])\n", + "test_score = lr.score(X_test[['body_mass_g']], y_test['species'])\n", "\n", - "print(\"Training score:\", train_score.round(3), \"Testing score:\", test_score.round(3))" + "print(f\"Training score: {train_score:0.3f} Testing score: {test_score:0.3f}\")" ] }, { @@ -264,10 +273,10 @@ }, "outputs": [], "source": [ - "sb.scatterplot(data=X_train.loc[y_train['species'].isin(['Adelie','Gentoo'])],\n", - " x = 'culmen_depth_mm',\n", - " y = 'body_mass_g',\n", - " hue = y_train['species'])" + "sb.scatterplot(data=X_train,\n", + " x='culmen_depth_mm',\n", + " y='body_mass_g',\n", + " hue=y_train['species'])" ] }, { @@ -284,12 +293,12 @@ "outputs": [], "source": [ "lr = LogisticRegression(max_iter=170)\n", - "lr.fit(X_train[['body_mass_g','culmen_depth_mm']], y_train['species'])\n", + "lr.fit(X_train[['body_mass_g', 'culmen_depth_mm']], y_train['species'])\n", "\n", - "train_score = lr.score(X_train[['body_mass_g','culmen_depth_mm']], y_train['species'])\n", - "test_score = lr.score(X_test[['body_mass_g','culmen_depth_mm']], y_test['species'])\n", + "train_score = lr.score(X_train[['body_mass_g', 'culmen_depth_mm']], y_train['species'])\n", + "test_score = lr.score(X_test[['body_mass_g', 'culmen_depth_mm']], y_test['species'])\n", "\n", - "print(\"Training score = {}, testing score = {}\".format(train_score.round(3), test_score.round(3)))" + "print(f\"Training score = {train_score:0.3f}, testing score = {test_score:0.3f}\")" ] }, { @@ -305,9 +314,7 @@ "metadata": {}, "outputs": [], "source": [ - "\n", "coef = pd.Series(index=['body_mass_g','culmen_depth_mm'], data=lr.coef_[0])\n", - "\n", "coef.sort_values()" ] }, @@ -343,7 +350,7 @@ "\n", "Accuracy, which is the most common metric used with classification can be characterized as:\n", "\n", - "$$ Accuracy= \\frac{\\sum{\\text{True Positives}}+\\sum{\\text{True Negatives}}}{\\sum{\\text{Total Population}}}$$" + "$$\\text{Accuracy} = \\frac{\\sum{\\text{True Positives}}+\\sum{\\text{True Negatives}}}{\\sum{\\text{Total Population}}}$$" ] }, { @@ -361,9 +368,9 @@ "1. **Precision**: \n", "$$\\frac{\\sum{\\text{True Positives}}}{\\sum{\\text{Predicted Positives}}}$$\n", "2. **Recall** (or **Sensitivity**): \n", - "$$\\frac{\\sum{\\text{True Positives}}}{\\sum{\\text{Condition Positives}}}$$ \n", + "$$\\frac{\\sum{\\text{True Positives}}}{\\sum{\\text{Actual Positives}}}$$ \n", "3. **Specificity** (like recall for negative examples): \n", - "$$\\frac{\\sum{\\text{True Negatives}}}{\\sum{\\text{Condition Negatives}}}$$\n" + "$$\\frac{\\sum{\\text{True Negatives}}}{\\sum{\\text{Actual Negatives}}}$$\n" ] }, { @@ -388,7 +395,7 @@ "metadata": {}, "outputs": [], "source": [ - "lr.fit(X_train['body_mass_g'].values.reshape(-1, 1), y_train['species'])\n", + "lr.fit(X_train[['body_mass_g']], y_train['species'])\n", "preds = lr.predict(X_test[['body_mass_g']])" ] }, @@ -408,11 +415,9 @@ "source": [ "## Challenge 1: Model Evaluation\n", "\n", - "1). What are the TP, FP, TN, FN in these model results?\n", - "\n", - "2). What is the precision and recall for this model?\n", + "1) What are the TP, FP, TN, FN in these model results?\n", "\n", - "3). Which is more important, precision or recall?" + "2) What is the precision and recall for this model?" ] }, { @@ -445,9 +450,9 @@ "The documentation is a great way to do that.\n", "Read the [documentation](https://scikit-learn.org/stable/modules/tree.html#tree) for the Decision Tree and let's try to answer the following questions:\n", "\n", - "1). What are two advantages and two disadvantages of the Decision Tree?\n", - "2). What measure do Decision Trees use to determine optimal split?\n", - "3). How do you import the Decision Tree from sklearn?\n", + "1) What are two advantages and two disadvantages of the Decision Tree?\n", + "2) What measure do Decision Trees use to determine optimal split?\n", + "3) How do you import the Decision Tree from sklearn?\n", "\n", "**Decision Trees** are a classification/regression supervised learning algorithm that uses a series of splits to make its predictions.\n", "\n", @@ -541,7 +546,7 @@ "train_score = dt.score(X_train[['body_mass_g']], y_train['species'])\n", "test_score = dt.score(X_test[['body_mass_g']], y_test['species'])\n", "\n", - "print(\"Our training score is {} and our testing score is {}\".format(train_score.round(3), test_score.round(3)))" + "print(f\"Our training score is {train_score:0.3f} and our testing score is {test_score:0.3f}\")" ] }, { @@ -587,8 +592,7 @@ "source": [ "plt.figure(figsize=(28, 20))\n", "plot_tree(dt, feature_names=['body_mass_g'], class_names=[\"Adelie\", \"Chinstrap\",\"Gentoo\"], \n", - " filled = True, proportion=True, fontsize=18\n", - " );" + " filled = True, proportion=True, fontsize=18)" ] }, { @@ -601,58 +605,13 @@ " - Penguin A: Body Mass of .5\n", " - Penguin B: Body Mass of 0" ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Challenge 2: Classification with SVM\n", - "\n", - "Now let's try another new model. The [Support Vector Machine](https://scikit-learn.org/stable/modules/svm.html#classification) is another class of machine learning algorithm that is used for classification. \n", - "\n", - "Choose two features of the data set to train your model on. Then, using the documentation for the support vector machine, follow the steps to:\n", - "- Initialize the model\n", - "- Fit it to the training data\n", - "- Evaluate the model on both the training and testing data\n", - "\n", - "Is your model underfit? Is it overfit?\n", - "\n", - "How does SVM fit in with the **linearly separable** problem identified in the scatter plots above?" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "## YOUR CODE HERE\n", - "from sklearn.svm import SVC\n", - "X_train_subset = X_train[['feature1','feature2']]\n", - "X_test_subset = X_test[['feature1','feature2']]\n", - "y_train_subset = y_train['species']\n", - "y_test_subset = y_test['species']\n", - "\n", - "##1) Initialize SVM\n", - "\n", - "##2) Train SVM on Training data \n", - "\n", - "##3) Evaluate SVM on Training and Test Data" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { "anaconda-cloud": {}, "hide_input": false, "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -666,7 +625,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.12" + "version": "3.11.6" }, "toc": { "base_numbering": 1, diff --git a/solutions/02_regularization_solutions.ipynb b/solutions/02_regularization_solutions.ipynb index ad0cfda..9b5e416 100644 --- a/solutions/02_regularization_solutions.ipynb +++ b/solutions/02_regularization_solutions.ipynb @@ -199,7 +199,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.7" + "version": "3.9.16" } }, "nbformat": 4, diff --git a/solutions/03_preprocessing_solutions.ipynb b/solutions/03_preprocessing_solutions.ipynb index b418f2a..4d01146 100644 --- a/solutions/03_preprocessing_solutions.ipynb +++ b/solutions/03_preprocessing_solutions.ipynb @@ -64,6 +64,16 @@ "\n", "Consider the regularization task applied in the previous notebook. How might the preprocessing steps affect the performance of regularization?" ] + }, + { + "cell_type": "markdown", + "id": "83175bef", + "metadata": {}, + "source": [ + "Regularization penalizes large model coefficients, so preprocessing strongly affects how that penalty behaves. If your features aren't on the same scale, one variable's coefficients can appear much larger simply because its values are larger in magnitude, not because it’s more important. That makes regularization (L1 or L2) unfairly penalize some features more than others and can distort the model.\n", + "\n", + "Standardizing or normalizing features before applying regularization ensures the penalty is applied uniformly, making the regularization strength meaningful and improving model stability and performance." + ] } ], "metadata": { @@ -82,7 +92,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.12" + "version": "3.10.17" } }, "nbformat": 4, diff --git a/solutions/04_classification_solutions.ipynb b/solutions/04_classification_solutions.ipynb index 448f0ce..794db11 100644 --- a/solutions/04_classification_solutions.ipynb +++ b/solutions/04_classification_solutions.ipynb @@ -7,7 +7,7 @@ "source": [ "## Challenge 1: Model Evaluation\n", "\n", - "1). What are the TP, FP, TN, FN in these model results?\n", + "1) What are the TP, FP, TN, FN in these model results?\n", "\n", "- TP: 26\n", "- FP: 3\n", @@ -15,78 +15,11 @@ "- FN: 4\n", "\n", "\n", - "2). What is the precision and recall for this model?\n", + "2) What is the precision and recall for this model?\n", "\n", - "**precision**: 26 / 29 = .896\n", - "**recall**: 26 / 30 = .8666\n", - "\n", - "3). Which is more important, precision or recall?\n", - "\n", - "**solution:** it depends on the model and this problem" - ] - }, - { - "cell_type": "markdown", - "id": "824b97aa", - "metadata": {}, - "source": [ - "## Challenge 2: Classification with SVM\n", - "\n", - "Now let's try another new model. The [Support Vector Machine](https://scikit-learn.org/stable/modules/svm.html#classification) is another class of machine learning algorithm that is used for classification. \n", - "\n", - "Choose two features of the data set to train your model on. Then, using the documentation for the support vector machine, follow the steps to:\n", - "- Initialize the model\n", - "- Fit it to the training data\n", - "- Evaluate the model on both the training and testing data\n", - "\n", - "Is your model underfit? Is it overfit? \n", - "\n", - "How does SVM fit in with the **linearly separable** problem identified in the scatter plots above?" + "**precision**: 26 / 29 = 0.896\n", + "**recall**: 26 / 30 = 0.867" ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "6ac4d9a3", - "metadata": {}, - "outputs": [ - { - "ename": "NameError", - "evalue": "name 'X_train' is not defined", - "output_type": "error", - "traceback": [ - "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)", - "Input \u001b[1;32mIn [3]\u001b[0m, in \u001b[0;36m\u001b[1;34m()\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[38;5;66;03m## YOUR CODE HERE\u001b[39;00m\n\u001b[0;32m 2\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01msklearn\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01msvm\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m SVC\n\u001b[1;32m----> 3\u001b[0m X_train_subset \u001b[38;5;241m=\u001b[39m \u001b[43mX_train\u001b[49m[[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbody_mass_g\u001b[39m\u001b[38;5;124m'\u001b[39m,\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mculmen_depth_mm\u001b[39m\u001b[38;5;124m'\u001b[39m]]\n\u001b[0;32m 4\u001b[0m X_test_subset \u001b[38;5;241m=\u001b[39m X_test[[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mbody_mass_g\u001b[39m\u001b[38;5;124m'\u001b[39m,\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mculmen_depth_mm\u001b[39m\u001b[38;5;124m'\u001b[39m]]\n\u001b[0;32m 5\u001b[0m y_train_subset \u001b[38;5;241m=\u001b[39m y_train[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mspecies\u001b[39m\u001b[38;5;124m'\u001b[39m]\n", - "\u001b[1;31mNameError\u001b[0m: name 'X_train' is not defined" - ] - } - ], - "source": [ - "## YOUR CODE HERE\n", - "from sklearn.svm import SVC\n", - "X_train_subset = X_train[['body_mass_g','culmen_depth_mm']]\n", - "X_test_subset = X_test[['body_mass_g','culmen_depth_mm']]\n", - "y_train_subset = y_train['species']\n", - "y_test_subset = y_test['species']\n", - "\n", - "##1) Initialize SVM\n", - "model = SVC()\n", - "\n", - "##2) Train SVM on Training data \n", - "model.fit(X_train_subset,y_train_subset)\n", - "##3) Evaluate SVM on Training and Test Data\n", - "model.score(X_train_subset,y_train_subset)\n", - "model.score(X_test_subset,y_test_subset)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "a031ab81", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": {