This commit is contained in:
Jacob Levine 2019-03-16 15:49:49 -05:00
commit f483cbbcfb
5 changed files with 9 additions and 19 deletions

View File

@ -1,5 +0,0 @@
4,5,10,15,8,954978,84,74
3,6,9,12,15,7,856,9
4,16,32,64,128,2,4234,-56
7,8,9,79.33333333,170.3333333,636647,5874.666667,-121
4,8,8,103.8333333,230.3333333,1114135,7949.666667,-186
1 4 5 10 15 8 954978 84 74
2 3 6 9 12 15 7 856 9
3 4 16 32 64 128 2 4234 -56
4 7 8 9 79.33333333 170.3333333 636647 5874.666667 -121
5 4 8 8 103.8333333 230.3333333 1114135 7949.666667 -186

View File

@ -1,5 +0,0 @@
3.1630010613819266,9.4292307303114,-0.323251889179911,-5.386181559067866,2.534879621508633,-5.165597428986722,6.781430809047265,-0.6282127632735541,-1.0861042779691985,9.35487366197819,8.797857763983743,-1.7228656825441355,-8.537192856364065,5.052775825388903,-5.801718614169187,-3.991567829343965,-6.354838195228005,-5.789567658308035,-2.234361028326452,-7.824326717389576,9.944153435265441,-2.6250058262846743,5.187785540324899,-7.817733885932993,-0.5495374257657222,-1.9071654677837895,5.573891899068942,-1.488902249404024,0.1466900371151887,-1.9859573811436793,-7.2484840322743,1.1313354023315867,-7.5618652049793855,-5.827244176508111,3.545169414494671,6.308215883868659,-6.718473082814393,8.377856694673874,-8.16137266764721,-5.075101123286288,-4.5852911742407,6.719021169503613,-6.029113281204543,5.273328597459566,0.0763770865509823,9.28885677894446,-7.947793863113885,7.845554524426525,-8.521879358485565,0.9347947446861724,-0.28152137414332934,9.527815722615298,-7.781986361995141,2.51994233096182,-8.375584210551812,7.579152243875466,-6.011614079234309,7.9368523400199,5.794364333401118,0.3270958957976884,3.343149418463785,1.187118681195516,5.683636971125912,3.058057837202666,2.9731154581416703,-5.951054389944959,-3.938143670001601,-8.423951328854164,2.0094359968578157,5.976845213102051,-4.498822138796992,5.810899623653306,-2.827881055139718,-1.8019945971538682,-4.9529807256756175,-1.9837251605735169,6.296210829315669,-3.2065733117364754,4.453313976934407,2.5735548193312408,5.146019114708203,-8.390100760859474,-5.111322602030599,4.295829898355002,2.883101334770684,6.65043004394818,-8.552982078286695,6.058368688959515,-9.298443633133909,5.416227761836057,3.1281090859797303,-2.7702280295615633,-5.368155844397277,2.684599018010413,6.603278656476263,0.493963745183553,9.93340040961121,0.8827110366761914,-0.44455956717372125,-6.748670065028741
6.542296157559289,-4.673766607185295,-1.655895129300406,0.918209908948235,2.8694117062272078,-4.50297617419654,-8.555393424416343,-0.8451646772993637,-5.502478482981161,3.7393214415492686,1.1303949983411936,-8.843834825051891,0.1525580480134785,-2.509520569886872,-7.2708155377447685,-6.985636447086776,-0.9437618858164178,7.7399854908313515,-2.607234595695733,-8.795702862339965,9.9696168389248,1.2331949933066255,-9.655538013694184,4.850180287638743,-0.8587066265618475,8.70059494121088,-7.721033875964618,6.940183300648368,-9.232007064557202,-4.8978901956939165,-2.0268568451287,4.091453500296922,-9.956003970918745,1.8585991523815473,-5.09553772739705,-0.2286792890090581,-4.501294061313754,-8.70023355793232,0.7426670182776984,4.715497324358681,9.686644349219563,8.269948493529341,4.984317712087412,-9.437623024210255,-1.0534823931214667,9.608823628851418,-2.6332068117394165,-8.057170930302103,-9.743710461870283,-3.337632155241228,-6.501042503531435,2.194382690602712,-7.42315133954826,2.911858704500643,3.158418490595693,7.484649262701598,1.6470373155344813,-6.061393093019387,3.660451182392851,-3.4459575254499146,-7.189201001276326,-0.19240762631782715,0.12870174904799825,3.618960833026714,-3.766225616338186,4.528556079041081,1.0163271611826286,2.3999525084645956,-6.879123348784875,3.9522719302622136,-7.81633997377612,8.523342842566095,4.318488633063733,1.7203975601128878,-4.9842885659559215,-6.430105111813429,-3.7232266461039636,0.2979685014530844,3.991329488510244,-6.581382396224768,4.116738382943552,5.746746496886768,-9.631600802511766,2.3750434881677673,-4.364124891293402,-9.886396101863966,1.464327404213389,2.233312839129791,-1.0582430103058158,-5.5969649756489765,-0.7958167325478236,5.223086048806927,-9.396289975287386,-8.867711544036862,-8.71173762021845,1.7306169427259288,4.944071857656414,-0.30571049742613887,3.725285856304687,6.842918676123311
-6.380962022950387,-7.23238786803212,7.724710932023122,8.820538118298728,-3.6247705993923702,-6.02910990094589,3.7783178082555136,7.382385748358594,7.1007772701997425,5.001608772556798,-0.3162902785528452,4.9796937758184985,0.03496683143143109,-5.9558491121412915,-8.406812074837156,6.486559121653531,-6.0768780899203385,-3.3307517540180225,-7.312999618157723,-2.914816041791446,-5.970236300833753,-3.6560427666514794,-4.318455314200678,-1.8697040766541804,6.200264734935381,-3.582682396420463,-7.86746508318619,-5.393477387577561,-8.533907349929386,0.7606219494832551,8.444703482630658,-2.4182177108605263,0.5167259026816655,-5.985575218519017,-0.4847645461345884,0.4938867790464485,3.3859633669265996,-5.488059596933974,-3.7018166734392004,1.9263404033770026,5.79333752602202,-7.861928423684102,-2.814719160010231,-7.457927237113687,-2.702639878663753,-1.0850988615218515,-2.8231982388751558,-6.699927959365358,4.5740210740062714,8.38356578875976,3.103579268695791,2.6238194762487304,0.34302801049465614,7.139699465511622,-6.9800185555674155,-2.4276445929860007,-1.1514716479418574,9.368369278785124,-9.574398566249748,6.6354782142969775,-4.370050426679546,7.301706721616622,7.717969385037431,-1.2558003938911622,-6.391743288043347,-6.913152807322913,-3.3966992760326704,6.55582203961173,-1.6854504831178385,1.8531758974318198,-0.2284060262449099,-7.831582717429722,8.115664615950568,5.352325134114736,8.49370615028851,8.378819084479552,-6.977461558209212,9.610993133155741,-8.824455668008648,6.4374563357201,7.016879991233818,-8.409965558647961,-3.102735995280746,0.6716366345097065,7.423452161669736,7.948855843951115,1.5686150915987955,-4.578358687412251,3.0102241016763323,6.534732365885727,2.4204803891869986,0.08970064307457726,6.171973872208451,9.440962219684756,4.968324039364651,2.922023625220117,-8.991016434695545,-8.475870805636951,-0.7214240683900393,-6.8150348280874145
1.6415418790420429,-4.68382005962376,6.3513972473855205,7.643704574574755,-0.8145467010137359,8.671474576469894,5.45383343668545,-9.4510090598109,4.099436509971175,3.6168224384134877,-1.3261944869697846,0.23325520577602532,-6.698614035684713,-5.215338996751262,-6.800072151923078,6.595179591664802,7.556648446838409,6.288400237464934,1.3716731555034674,5.63407862327082,2.149316675981135,-6.384809711292405,-6.340082975138818,5.553527499831619,-3.704310294625417,5.2689956833057146,5.001979425343988,-5.393407137620176,1.3384740729331828,-1.223537737218095,9.89797815395471,-5.784777060606443,-3.3207771632682253,0.27455689618758683,3.471904391154986,-2.6372312514949625,8.671482125296514,9.022718108941902,-6.242145931189715,-2.9104308518656152,-2.545587555122575,2.056949635755924,6.784372241194362,-6.592300461822487,-8.767364450698995,7.181491792958067,0.8713219419356815,5.487413338010009,9.611853228411597,-4.298601592409767,3.479304772708902,2.6684427161432662,-3.5025260874436936,7.729917927038382,9.225758796611998,-1.8596887516912037,-1.2518413082635789,-5.785177100669296,-7.025376434217061,6.160069521108127,-9.399311448577482,-4.379881418664211,-8.122261514178478,7.934267309677633,8.735817171356778,9.790926538266142,-0.8243870696971243,-7.852689538083952,7.981935542589838,-2.0735409824724904,9.020032792938451,-1.955969480414435,-7.632118536265815,-9.138864984258623,-2.5399698457077164,1.519481291997911,4.186570245179681,-1.9675132113088463,0.9531494871320216,7.4254851954775205,0.5486483093251593,4.647829037537392,-4.023059086640237,-8.207960430472687,2.269270288967899,-9.965662236303771,-7.377604843084704,-6.495410792459277,-9.155307827098227,-7.550273837801629,-2.580759349404584,5.9446290891432785,9.563272303326645,-5.448165855656946,2.074489755722695,7.429875376423773,0.36146653006902696,-1.697792241583782,-6.854175474546061,-1.3463273799611049
-0.20865461444407885,-7.468800174091676,3.1100743583567123,-6.38856000184266,-0.7288995055783687,4.439380706650006,-6.742961592416846,-7.695233390810272,9.793180149973345,-0.9263675889304821,2.8779457711853436,-9.632924775703358,6.291838752691326,-5.8521239175777895,-0.055068458060976155,-0.18885028920767866,-7.506821745976349,1.9963322226082312,-7.034120081345114,-3.8537233966950506,6.57231766128962,7.9324667080131555,-6.119671627762681,4.107503940906723,-9.378703152476795,8.381783046891652,3.337136237757406,-4.251474828195894,7.143164061073538,7.729974002010568,7.8448818393705615,0.15083281184151076,7.439616964452743,9.846824011915793,-3.2404094429959613,7.347951525581973,-5.140733443216128,-7.445493835123907,3.7697792600698836,6.981794330976694,-6.9173508434805715,-7.817656961634545,4.490854473245387,-8.697731264036793,0.6382850317081399,5.795509605303309,1.1466867909946359,6.145435846470246,6.550422586845471,3.0456342954663675,3.953776905595305,3.1891975207480208,-2.7896199685803786,9.204691246096338,7.9829700066234075,-1.0564654991959088,8.601559866724251,1.526314737225638,2.9801431604106003,8.054125889844691,-8.872314685247282,-6.496162701714963,-7.653415312635936,1.8543555604598438,9.701615152611598,1.9574374117654258,-6.350500206574754,5.644784368614538,-8.02128983737304,-7.185493707807935,8.223920703325376,-9.245847496833164,9.316165823946385,1.584506388184888,-2.446125243428572,-2.440911967817307,-2.1599472586744177,8.526024909024699,-3.207272921378655,-6.462929551065367,5.917111401259227,-2.1648801534070934,-8.698474372578552,-4.355748832176134,7.17417022803707,2.0814012954334,-2.6273410129812946,-7.069315426086122,-1.0142519669591827,5.180561003550306,7.216583223812577,1.7650169674330591,7.0261347144494515,-1.5493911448681388,5.053325004495541,-0.43829339911996,9.470377105456983,4.1602125904972596,8.47287007688659,7.727301940496247
1 3.1630010613819266 9.4292307303114 -0.323251889179911 -5.386181559067866 2.534879621508633 -5.165597428986722 6.781430809047265 -0.6282127632735541 -1.0861042779691985 9.35487366197819 8.797857763983743 -1.7228656825441355 -8.537192856364065 5.052775825388903 -5.801718614169187 -3.991567829343965 -6.354838195228005 -5.789567658308035 -2.234361028326452 -7.824326717389576 9.944153435265441 -2.6250058262846743 5.187785540324899 -7.817733885932993 -0.5495374257657222 -1.9071654677837895 5.573891899068942 -1.488902249404024 0.1466900371151887 -1.9859573811436793 -7.2484840322743 1.1313354023315867 -7.5618652049793855 -5.827244176508111 3.545169414494671 6.308215883868659 -6.718473082814393 8.377856694673874 -8.16137266764721 -5.075101123286288 -4.5852911742407 6.719021169503613 -6.029113281204543 5.273328597459566 0.0763770865509823 9.28885677894446 -7.947793863113885 7.845554524426525 -8.521879358485565 0.9347947446861724 -0.28152137414332934 9.527815722615298 -7.781986361995141 2.51994233096182 -8.375584210551812 7.579152243875466 -6.011614079234309 7.9368523400199 5.794364333401118 0.3270958957976884 3.343149418463785 1.187118681195516 5.683636971125912 3.058057837202666 2.9731154581416703 -5.951054389944959 -3.938143670001601 -8.423951328854164 2.0094359968578157 5.976845213102051 -4.498822138796992 5.810899623653306 -2.827881055139718 -1.8019945971538682 -4.9529807256756175 -1.9837251605735169 6.296210829315669 -3.2065733117364754 4.453313976934407 2.5735548193312408 5.146019114708203 -8.390100760859474 -5.111322602030599 4.295829898355002 2.883101334770684 6.65043004394818 -8.552982078286695 6.058368688959515 -9.298443633133909 5.416227761836057 3.1281090859797303 -2.7702280295615633 -5.368155844397277 2.684599018010413 6.603278656476263 0.493963745183553 9.93340040961121 0.8827110366761914 -0.44455956717372125 -6.748670065028741
2 6.542296157559289 -4.673766607185295 -1.655895129300406 0.918209908948235 2.8694117062272078 -4.50297617419654 -8.555393424416343 -0.8451646772993637 -5.502478482981161 3.7393214415492686 1.1303949983411936 -8.843834825051891 0.1525580480134785 -2.509520569886872 -7.2708155377447685 -6.985636447086776 -0.9437618858164178 7.7399854908313515 -2.607234595695733 -8.795702862339965 9.9696168389248 1.2331949933066255 -9.655538013694184 4.850180287638743 -0.8587066265618475 8.70059494121088 -7.721033875964618 6.940183300648368 -9.232007064557202 -4.8978901956939165 -2.0268568451287 4.091453500296922 -9.956003970918745 1.8585991523815473 -5.09553772739705 -0.2286792890090581 -4.501294061313754 -8.70023355793232 0.7426670182776984 4.715497324358681 9.686644349219563 8.269948493529341 4.984317712087412 -9.437623024210255 -1.0534823931214667 9.608823628851418 -2.6332068117394165 -8.057170930302103 -9.743710461870283 -3.337632155241228 -6.501042503531435 2.194382690602712 -7.42315133954826 2.911858704500643 3.158418490595693 7.484649262701598 1.6470373155344813 -6.061393093019387 3.660451182392851 -3.4459575254499146 -7.189201001276326 -0.19240762631782715 0.12870174904799825 3.618960833026714 -3.766225616338186 4.528556079041081 1.0163271611826286 2.3999525084645956 -6.879123348784875 3.9522719302622136 -7.81633997377612 8.523342842566095 4.318488633063733 1.7203975601128878 -4.9842885659559215 -6.430105111813429 -3.7232266461039636 0.2979685014530844 3.991329488510244 -6.581382396224768 4.116738382943552 5.746746496886768 -9.631600802511766 2.3750434881677673 -4.364124891293402 -9.886396101863966 1.464327404213389 2.233312839129791 -1.0582430103058158 -5.5969649756489765 -0.7958167325478236 5.223086048806927 -9.396289975287386 -8.867711544036862 -8.71173762021845 1.7306169427259288 4.944071857656414 -0.30571049742613887 3.725285856304687 6.842918676123311
3 -6.380962022950387 -7.23238786803212 7.724710932023122 8.820538118298728 -3.6247705993923702 -6.02910990094589 3.7783178082555136 7.382385748358594 7.1007772701997425 5.001608772556798 -0.3162902785528452 4.9796937758184985 0.03496683143143109 -5.9558491121412915 -8.406812074837156 6.486559121653531 -6.0768780899203385 -3.3307517540180225 -7.312999618157723 -2.914816041791446 -5.970236300833753 -3.6560427666514794 -4.318455314200678 -1.8697040766541804 6.200264734935381 -3.582682396420463 -7.86746508318619 -5.393477387577561 -8.533907349929386 0.7606219494832551 8.444703482630658 -2.4182177108605263 0.5167259026816655 -5.985575218519017 -0.4847645461345884 0.4938867790464485 3.3859633669265996 -5.488059596933974 -3.7018166734392004 1.9263404033770026 5.79333752602202 -7.861928423684102 -2.814719160010231 -7.457927237113687 -2.702639878663753 -1.0850988615218515 -2.8231982388751558 -6.699927959365358 4.5740210740062714 8.38356578875976 3.103579268695791 2.6238194762487304 0.34302801049465614 7.139699465511622 -6.9800185555674155 -2.4276445929860007 -1.1514716479418574 9.368369278785124 -9.574398566249748 6.6354782142969775 -4.370050426679546 7.301706721616622 7.717969385037431 -1.2558003938911622 -6.391743288043347 -6.913152807322913 -3.3966992760326704 6.55582203961173 -1.6854504831178385 1.8531758974318198 -0.2284060262449099 -7.831582717429722 8.115664615950568 5.352325134114736 8.49370615028851 8.378819084479552 -6.977461558209212 9.610993133155741 -8.824455668008648 6.4374563357201 7.016879991233818 -8.409965558647961 -3.102735995280746 0.6716366345097065 7.423452161669736 7.948855843951115 1.5686150915987955 -4.578358687412251 3.0102241016763323 6.534732365885727 2.4204803891869986 0.08970064307457726 6.171973872208451 9.440962219684756 4.968324039364651 2.922023625220117 -8.991016434695545 -8.475870805636951 -0.7214240683900393 -6.8150348280874145
4 1.6415418790420429 -4.68382005962376 6.3513972473855205 7.643704574574755 -0.8145467010137359 8.671474576469894 5.45383343668545 -9.4510090598109 4.099436509971175 3.6168224384134877 -1.3261944869697846 0.23325520577602532 -6.698614035684713 -5.215338996751262 -6.800072151923078 6.595179591664802 7.556648446838409 6.288400237464934 1.3716731555034674 5.63407862327082 2.149316675981135 -6.384809711292405 -6.340082975138818 5.553527499831619 -3.704310294625417 5.2689956833057146 5.001979425343988 -5.393407137620176 1.3384740729331828 -1.223537737218095 9.89797815395471 -5.784777060606443 -3.3207771632682253 0.27455689618758683 3.471904391154986 -2.6372312514949625 8.671482125296514 9.022718108941902 -6.242145931189715 -2.9104308518656152 -2.545587555122575 2.056949635755924 6.784372241194362 -6.592300461822487 -8.767364450698995 7.181491792958067 0.8713219419356815 5.487413338010009 9.611853228411597 -4.298601592409767 3.479304772708902 2.6684427161432662 -3.5025260874436936 7.729917927038382 9.225758796611998 -1.8596887516912037 -1.2518413082635789 -5.785177100669296 -7.025376434217061 6.160069521108127 -9.399311448577482 -4.379881418664211 -8.122261514178478 7.934267309677633 8.735817171356778 9.790926538266142 -0.8243870696971243 -7.852689538083952 7.981935542589838 -2.0735409824724904 9.020032792938451 -1.955969480414435 -7.632118536265815 -9.138864984258623 -2.5399698457077164 1.519481291997911 4.186570245179681 -1.9675132113088463 0.9531494871320216 7.4254851954775205 0.5486483093251593 4.647829037537392 -4.023059086640237 -8.207960430472687 2.269270288967899 -9.965662236303771 -7.377604843084704 -6.495410792459277 -9.155307827098227 -7.550273837801629 -2.580759349404584 5.9446290891432785 9.563272303326645 -5.448165855656946 2.074489755722695 7.429875376423773 0.36146653006902696 -1.697792241583782 -6.854175474546061 -1.3463273799611049
5 -0.20865461444407885 -7.468800174091676 3.1100743583567123 -6.38856000184266 -0.7288995055783687 4.439380706650006 -6.742961592416846 -7.695233390810272 9.793180149973345 -0.9263675889304821 2.8779457711853436 -9.632924775703358 6.291838752691326 -5.8521239175777895 -0.055068458060976155 -0.18885028920767866 -7.506821745976349 1.9963322226082312 -7.034120081345114 -3.8537233966950506 6.57231766128962 7.9324667080131555 -6.119671627762681 4.107503940906723 -9.378703152476795 8.381783046891652 3.337136237757406 -4.251474828195894 7.143164061073538 7.729974002010568 7.8448818393705615 0.15083281184151076 7.439616964452743 9.846824011915793 -3.2404094429959613 7.347951525581973 -5.140733443216128 -7.445493835123907 3.7697792600698836 6.981794330976694 -6.9173508434805715 -7.817656961634545 4.490854473245387 -8.697731264036793 0.6382850317081399 5.795509605303309 1.1466867909946359 6.145435846470246 6.550422586845471 3.0456342954663675 3.953776905595305 3.1891975207480208 -2.7896199685803786 9.204691246096338 7.9829700066234075 -1.0564654991959088 8.601559866724251 1.526314737225638 2.9801431604106003 8.054125889844691 -8.872314685247282 -6.496162701714963 -7.653415312635936 1.8543555604598438 9.701615152611598 1.9574374117654258 -6.350500206574754 5.644784368614538 -8.02128983737304 -7.185493707807935 8.223920703325376 -9.245847496833164 9.316165823946385 1.584506388184888 -2.446125243428572 -2.440911967817307 -2.1599472586744177 8.526024909024699 -3.207272921378655 -6.462929551065367 5.917111401259227 -2.1648801534070934 -8.698474372578552 -4.355748832176134 7.17417022803707 2.0814012954334 -2.6273410129812946 -7.069315426086122 -1.0142519669591827 5.180561003550306 7.216583223812577 1.7650169674330591 7.0261347144494515 -1.5493911448681388 5.053325004495541 -0.43829339911996 9.470377105456983 4.1602125904972596 8.47287007688659 7.727301940496247

View File

@ -1,5 +0,0 @@
1,2,3,4,5,6,7,8
5,6,7,8,9,10,11,12
1000,2000,3000,4000,5000,6000,7000,8000
0,0,0,0,0,0,0,1
3,5,6,7,8.5,9.8,11.1,12.4
1 1 2 3 4 5 6 7 8
2 5 6 7 8 9 10 11 12
3 1000 2000 3000 4000 5000 6000 7000 8000
4 0 0 0 0 0 0 0 1
5 3 5 6 7 8.5 9.8 11.1 12.4

View File

@ -38,7 +38,7 @@ __author__ = (
"Arthur Lu <arthurlu@ttic.edu>, "
"Jacob Levine <jlevine@ttic.edu>,"
)
s
import firebase_admin
from firebase_admin import credentials
from firebase_admin import firestore

View File

@ -30,9 +30,10 @@ from sklearn import metrics, datasets
import numpy as np
import matplotlib.pyplot as plt
import math
import time
#enable CUDA if possible
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
device = torch.device("cpu")
#linear_nn: creates a fully connected network given params
def linear_nn(in_dim, hidden_dim, out_dim, num_hidden, act_fn="tanh", end="none"):
@ -194,8 +195,12 @@ def retyuoipufdyu():
data = torch.tensor(datasets.fetch_california_housing()['data']).to(torch.float)
ground = datasets.fetch_california_housing()['target']
ground=torch.tensor(ground).to(torch.float)
ground = torch.tensor(ground).to(torch.float)
model = linear_nn(8, 100, 1, 20, act_fn = "relu")
print(model)
return train_sgd_simple(model,"regression", data, ground, learnrate=1e-4, iters=1000)
#retyuoipufdyu()
start = time.time()
retyuoipufdyu()
end = time.time()
print(end-start)