diff --git a/dev-0/out.tsv b/dev-0/out.tsv index bc38ef9..c451e36 100644 --- a/dev-0/out.tsv +++ b/dev-0/out.tsv @@ -1,462 +1,462 @@ -753233.5625 -717278.0 -761310.75 -737726.625 -581629.3125 -633398.5625 -734318.5 -742838.8125 -635378.125 -736022.625 -626772.6875 -726735.5 -755602.1875 -660751.5625 -752824.625 -737743.6875 -728132.8125 -1178018.125 -735153.5 -534563.3125 -741015.5 -903060.0 -739771.5 -954096.4375 -753063.125 -688970.6875 -977016.0 -737845.9375 -751359.125 -768007.75 -727502.3125 -730910.4375 -761072.25 -647391.75 -761072.25 -909365.0 -789121.0 -577675.875 -721061.0 -793636.75 -727894.25 -942082.875 -891472.375 -739243.25 -784162.1875 -577062.4375 -624591.5 -644341.5 -725832.375 -624216.5625 -620229.0625 -899992.625 -716937.125 -747951.0 -776238.3125 -729206.375 -636997.0 -704648.0 -687266.625 -526043.0 -707684.125 -582992.5625 -613992.25 -1065286.125 -802480.75 -657002.625 -845082.1875 -780805.1875 -752364.5 -682154.5 -705690.375 -715948.8125 -739430.75 -919589.3125 -725951.625 -985195.5 -764139.5 -970915.5 -730160.625 -943786.875 -895732.5 -538721.1875 -724094.1875 -725798.25 -899992.625 -738646.875 -532859.25 -754767.25 -712165.8125 -534563.3125 -794128.0 -777976.5 -594205.25 -942082.875 -886360.25 -911921.0625 -880225.625 -754750.1875 -737897.0625 -547684.5 -951114.375 -732614.5 -738749.125 -724043.125 -526434.9375 -525617.0 -952818.375 -724366.875 -724486.125 -733466.5 -732273.6875 -774173.5 -895851.8125 -752040.75 -724298.6875 -732273.6875 -735681.75 -738067.5 -720345.25 -570348.5 -709609.75 -939185.9375 -1076822.5 -824463.125 -744542.875 -701444.375 -717448.375 -663409.875 -728712.1875 -758175.3125 -642961.1875 -1082383.625 -945965.1875 -740282.75 -734829.75 -886258.0 -529451.125 -894999.75 -717278.0 -741475.5625 -636465.875 -787144.25 -580402.375 -609218.0 -764991.5625 -536437.75 -658297.6875 -682648.6875 -648260.8125 -971563.0 -897538.8125 -737266.5625 -992863.75 -736022.625 -967575.5 -717278.0 -907916.5 -763117.125 -727195.625 -663409.875 -735187.625 -675338.25 -735937.375 -730910.4375 -737845.9375 -708042.0 -978924.5625 -888916.3125 -763287.5 -613992.25 -724043.125 -552166.1875 -737743.6875 -753063.125 -705789.75 -554228.125 -951404.0 -710666.25 -739345.5 -730041.375 -698104.4375 -548195.75 -514114.625 -713733.5 -700953.125 -901696.75 -738646.875 -613259.5 -762946.6875 -742838.8125 -803523.125 -770069.625 -727502.3125 -595738.875 -728320.25 -771807.75 -732614.5 -745531.25 -759368.125 -776919.9375 -727502.3125 -880140.375 -708076.0625 -753063.125 -904116.5 -724094.1875 -742838.8125 -632736.875 -662285.1875 -723634.125 -754767.25 -778624.0 -677601.75 -534563.3125 -763287.5 -555898.0625 -743520.4375 -783054.5 -739788.5625 -732614.5 -740197.5 -546679.125 -503890.28125 -556443.375 -548076.4375 -734318.5 -589076.0625 -717278.0 -730041.375 -707735.25 -721435.875 -708416.875 -724094.1875 -629328.75 -762810.375 -583742.375 -734318.5 -1117450.125 -723412.5625 -634440.9375 -538244.0625 -526179.3125 -633827.4375 -705349.625 -554500.75 -733125.6875 -733636.875 -639893.875 -737556.25 -665284.3125 -743861.25 -723276.25 -708076.0625 -802855.6875 -729632.375 -733602.875 -739430.75 -642719.75 -697491.0 -663409.875 -619513.375 -528939.875 -594546.0625 -703798.875 -552967.125 -805888.875 -523060.90625 -612816.4375 -1039725.25 -710938.875 -707053.625 -919418.875 -1036317.125 -696249.9375 -747030.8125 -663665.5 -677059.375 -670226.125 -736022.625 -992522.9375 -912773.125 -947467.6875 -522634.90625 -747899.875 -592501.1875 -717278.0 -640626.625 -521459.09375 -761583.4375 -718641.25 -1005473.75 -749229.0 -734318.5 -920373.1875 -908683.375 -700595.25 -728081.6875 -740282.75 -735698.8125 -636145.0 -923849.4375 -792648.375 -961338.6875 -804627.875 -717278.0 -645176.5 -553188.625 -520930.84375 -573092.0 -544872.8125 -733926.625 -522345.21875 -706181.6875 -720305.375 -570348.5 -717278.0 -743690.875 -772370.125 -616088.25 -768399.625 -904440.25 -976675.1875 -580572.8125 -532859.25 -544787.625 -713921.0 -1184289.0 -726411.75 -910217.0 -886019.375 -732614.5 -704548.6875 -956888.1875 -760901.8125 -599147.0 -1111295.625 -753063.125 -917033.25 -735085.375 -892051.75 -773136.9375 -949188.75 -557482.875 -729206.375 -606324.0 -783906.5625 -606324.0 -570246.25 -745585.25 -732819.0 -728422.5 -738578.6875 -533336.375 -742458.125 -611197.5625 -538244.0625 -717295.0 -616497.1875 -712063.5625 -651481.5 -760561.0 -599147.0 -669183.75 -906808.875 -753233.5625 -560124.125 -746076.5 -1146211.75 -570246.25 -734301.5 -739430.75 -708842.875 -724946.25 -845593.375 -580061.5625 -722816.125 -627624.6875 -906808.875 -726343.5625 -660001.75 -541652.1875 -915138.8125 -615642.25 -733994.75 -636806.625 -895831.875 -558249.6875 -703884.125 -740569.5 -704071.5625 -540646.75 -539573.1875 -771807.75 -574438.1875 -556716.0 -636806.625 -675338.25 -574659.75 -895050.875 -749859.5 -743486.375 -733276.1875 -1011949.125 -969518.125 -936459.5 -1255859.375 -714173.6875 -566940.375 -725713.0625 -654889.5625 -807490.75 -613157.25 -580794.3125 -634492.0 -797453.8125 -598499.5 -992673.375 -744031.625 -580760.25 -591700.3125 -895542.1875 -724043.125 -595298.75 -764395.125 -731114.875 -546662.0625 -738698.0 -738698.0 -733279.0625 -738425.3125 -796669.9375 -795920.1875 -644324.4375 -689822.75 -663069.0625 -787076.125 -992352.5 -617380.4375 -835519.5 -736056.6875 -559749.25 -630893.5625 -580095.6875 -638019.4375 -654395.4375 -675048.5625 -868899.125 -763696.5 -714074.375 -730893.375 -713852.8125 -585667.9375 -713852.8125 -733347.25 -574012.1875 -776545.0625 -597408.875 -776545.0625 -557107.9375 -744815.5 -1171488.75 -775045.5 +525398.4375 +517908.5 +527081.0625 +522168.1875 +577209.125 +587993.25 +521458.25 +523233.09375 +544626.75 +521813.21875 +542834.125 +519878.59375 +525891.875 +549912.3125 +525313.25 +522171.71875 +520169.6875 +394991.40625 +521632.1875 +567404.75 +522853.28125 +469051.1875 +522594.15625 +479682.6875 +525362.9375 +555790.6875 +484457.09375 +522193.03125 +525008.0 +528476.0625 +520038.34375 +520748.28125 +527031.3125 +547129.3125 +527031.3125 +470364.59375 +532874.25 +576385.625 +518696.53125 +533814.9375 +520119.96875 +477180.125 +466637.375 +522484.125 +531841.25 +576257.8125 +542379.75 +546493.875 +519690.46875 +542301.625 +541471.0 +468412.25 +517837.5 +524298.0625 +530190.625 +520393.3125 +544963.9375 +559056.4375 +555435.6875 +565629.875 +515909.96875 +577493.125 +540171.8125 +502844.8125 +535657.25 +549131.375 +544531.625 +531141.9375 +525217.4375 +554370.75 +515494.65625 +517631.59375 +522523.15625 +472494.4375 +519715.3125 +486160.96875 +527670.3125 +483186.28125 +520592.09375 +477535.09375 +467524.8125 +568270.875 +519328.375 +519683.34375 +468412.25 +522359.875 +567049.75 +525717.9375 +516843.5625 +567404.75 +577696.1875 +530552.6875 +579828.875 +477180.125 +465572.4375 +470897.0625 +464294.53125 +525714.375 +522203.6875 +570138.0625 +479061.5 +521103.25 +522381.15625 +519317.75 +565711.5 +565541.125 +479416.46875 +519385.1875 +519410.03125 +521280.75 +521032.25 +573539.4375 +467549.65625 +525150.0 +519370.96875 +521032.25 +521742.21875 +522239.1875 +518547.4375 +574859.1875 +516311.09375 +476576.65625 +505248.0 +540236.375 +523588.09375 +558389.125 +517943.96875 +550466.0625 +520290.375 +526427.875 +546206.375 +418848.53125 +521767.78125 +522700.65625 +521564.71875 +465551.125 +566339.8125 +467372.15625 +517908.5 +522949.125 +588632.25 +532462.4375 +576953.5625 +582956.1875 +527847.75 +567795.1875 +549401.125 +554473.75 +547310.3125 +483321.1875 +467901.0625 +522072.34375 +487758.375 +521813.21875 +482490.53125 +517908.5 +470062.875 +527457.3125 +519974.4375 +550466.0625 +521639.28125 +552950.875 +521795.46875 +520748.28125 +522193.03125 +515984.53125 +484854.6875 +466104.90625 +527492.8125 +540171.8125 +519317.75 +571071.625 +522171.71875 +525362.9375 +559294.3125 +571501.125 +479121.8125 +516531.1875 +522505.40625 +520567.25 +557693.375 +570244.5 +563145.0625 +517170.125 +514507.8125 +468767.21875 +522359.875 +540019.125 +527421.8125 +523233.09375 +492095.4375 +528905.625 +520038.34375 +580148.3125 +520208.71875 +529267.6875 +521103.25 +523793.96875 +526676.375 +530332.625 +520038.34375 +464276.78125 +515991.625 +525362.9375 +469271.28125 +519328.375 +523233.09375 +544076.5 +550231.75 +519232.53125 +525717.9375 +530687.5625 +597201.3125 +567404.75 +527492.8125 +571849.0 +523375.09375 +531610.5 +522597.6875 +521103.25 +522682.90625 +569928.625 +561015.1875 +571962.625 +570219.6875 +521458.25 +578760.375 +517908.5 +520567.25 +515920.625 +518774.625 +516062.625 +519328.375 +543366.5625 +527393.4375 +577649.3125 +521458.25 +469932.25 +519186.40625 +544431.5 +568171.5 +565658.25 +544303.6875 +515423.65625 +571557.9375 +521209.75 +521316.25 +545567.375 +522132.6875 +550856.5 +523446.09375 +519158.0 +515991.625 +535735.3125 +520482.0625 +521309.15625 +522523.15625 +589935.0 +557565.5625 +550466.0625 +541321.875 +566233.3125 +579899.875 +515100.625 +571238.4375 +536367.1875 +565008.625 +539926.875 +497520.1875 +516587.96875 +515778.625 +472458.9375 +496810.21875 +513528.09375 +524106.34375 +550519.3125 +553309.375 +551885.9375 +521813.21875 +487687.375 +471074.5625 +478301.84375 +564919.9375 +524287.375 +579473.875 +517908.5 +545720.0625 +564675.0 +527137.8125 +518192.46875 +490385.1875 +524564.25 +521458.25 +472657.75 +470222.59375 +514433.28125 +520159.03125 +522700.65625 +521745.75 +544786.4375 +473381.875 +533609.0 +481191.34375 +536104.5 +517908.5 +546667.8125 +571284.625 +564564.9375 +575430.75 +569552.3125 +521376.59375 +564859.5625 +559375.9375 +606097.0 +574859.1875 +517908.5 +523410.59375 +529384.8125 +540608.375 +528557.75 +469338.71875 +484386.09375 +576989.0625 +567049.75 +569534.5625 +517209.1875 +396297.6875 +519811.15625 +470542.09375 +465501.4375 +521103.25 +515256.8125 +524043.1875 +526995.8125 +580858.25 +512429.125 +525362.9375 +471962.0 +521617.96875 +466758.0625 +529544.5625 +478660.375 +572179.125 +520393.3125 +538574.375 +531788.0 +538574.375 +574837.875 +480026.28125 +521145.84375 +520230.03125 +522345.65625 +567149.125 +610711.6875 +539589.625 +568171.5 +517912.03125 +540693.625 +516822.25 +547981.25 +526924.875 +580858.25 +595447.75 +469832.125 +525398.4375 +572729.375 +523907.5625 +519702.5625 +574837.875 +521454.6875 +522523.15625 +516151.34375 +519505.875 +544638.125 +576882.5625 +519062.15625 +543011.5625 +469832.125 +519796.9375 +549756.125 +568881.4375 +515346.28125 +584294.4375 +521390.78125 +588703.25 +511324.4375 +572338.875 +515118.375 +566539.3125 +515157.4375 +568672.0 +568448.375 +529267.6875 +575711.125 +572019.375 +588703.25 +552950.875 +575757.3125 +467382.8125 +524695.625 +523368.0 +565020.0 +491734.09375 +482895.21875 +476008.6875 +411206.65625 +561040.75 +574149.25 +519665.625 +548691.1875 +536700.875 +539997.875 +577035.1875 +544442.125 +534610.0625 +580723.375 +531497.625 +523481.59375 +577028.125 +579307.0625 +511264.09375 +519317.75 +536277.6875 +527723.5625 +520790.875 +569925.0625 +522370.53125 +522370.53125 +521241.6875 +522313.71875 +534446.75 +534290.5625 +546490.3125 +555968.1875 +550395.0625 +532448.25 +487651.875 +584656.5 +586318.5 +521820.3125 +572651.25 +587471.4375 +576889.6875 +545176.9375 +548588.25 +552890.5625 +637050.8125 +527578.0 +517241.125 +520744.75 +517195.0 +578050.4375 +517195.0 +521255.90625 +575622.375 +530254.5 +580496.1875 +530254.5 +572101.0625 +523644.875 +437410.1875 +529942.125 diff --git a/model.pkl b/model.pkl index e4ca2a9..c5e106d 100644 Binary files a/model.pkl and b/model.pkl differ diff --git a/predict.py b/predict.py index 4cf3cb0..988fa7e 100644 --- a/predict.py +++ b/predict.py @@ -20,6 +20,7 @@ def dataframe_to_arrays(dataframe): dataframe1["type"] = dataframe1["type"].astype('category').cat.codes return dataframe1 +#PREDICT_FILE_PATH = 'dev-0/in.tsv' PREDICT_FILE_PATH = 'test-A/in.tsv' def main(): diff --git a/test-A/out.tsv b/test-A/out.tsv index 36c42d6..837d29a 100644 --- a/test-A/out.tsv +++ b/test-A/out.tsv @@ -1,418 +1,418 @@ -758158.25 -761583.4375 -739686.3125 -639161.125 -728115.75 -810830.625 -545639.625 -880205.6875 -1147683.0 -735784.0 -756454.25 -758175.3125 -735000.125 -717278.0 -734318.5 -736022.625 -806911.3125 -834196.125 -703645.5 -939049.625 -778624.0 -705349.625 -646369.3125 -718982.0 -618062.0625 -735698.8125 -760987.0 -1111420.75 -607704.25 -735681.75 -1005644.125 -944298.125 -1056765.75 -620621.0 -636145.0 -776238.3125 -922145.375 -747951.0 -725798.25 -681779.625 -761072.25 -563344.8125 -532007.1875 -754767.25 -715573.9375 -738646.875 -756641.6875 -713409.75 -704838.375 -628286.375 -753114.25 -610243.3125 -627454.3125 -757834.5 -734318.5 -946036.25 -665812.5625 -622410.25 -643881.375 -723412.5625 -620958.9375 -923849.4375 -736022.625 -976675.1875 -718078.875 -653185.5 -701069.5 -560771.6875 -917033.25 -719322.875 -893176.4375 -575460.625 -941742.0 -933835.25 -730399.25 -759027.375 -724435.0 -910217.0 -735698.8125 -746246.9375 -816215.5 -797147.125 -674264.6875 -760731.375 -707053.625 -745105.25 -724230.5 -757323.3125 -735341.0 -717278.0 -746570.6875 -894829.375 -757152.875 -917033.25 -549899.8125 -1070398.25 -828893.625 -942082.875 -534733.6875 -530643.9375 -742838.8125 -737726.625 -741134.75 -753063.125 -724605.375 -731080.8125 -759879.375 -622969.75 -622066.5625 -543083.5625 -1022684.6875 -746332.125 -703901.125 -629328.75 -625730.3125 -703815.9375 -543236.9375 -743350.0 -820563.75 -539505.0625 -822608.625 -726548.0 -730586.625 -736908.6875 -681029.8125 -886019.375 -628647.125 -737845.9375 -752824.625 -754767.25 -936118.625 -566122.4375 -717278.0 -718982.0 -760390.625 -983340.9375 -730910.4375 -737726.625 -558420.0625 -716235.625 -561811.125 -710666.25 -761242.625 -762265.0625 -800776.75 -544787.625 -728183.9375 -1022684.6875 -759879.375 -738220.8125 -705042.875 -725798.25 -712268.0625 -766695.625 -532859.25 -732614.5 -1072085.25 -1051210.625 -736942.75 -825826.375 -766695.625 -537971.375 -734318.5 -657871.6875 -767240.875 -595298.75 -753693.625 -747951.0 -742838.8125 -754750.1875 -518715.5625 -774023.0625 -738527.5625 -718982.0 -533285.25 -727604.5625 -549899.8125 -639893.875 -677042.3125 -626448.875 -717278.0 -946002.1875 -778624.0 -743179.625 -718198.1875 -721026.875 -683057.625 -982449.0625 -742838.8125 -765673.1875 -841012.375 -558300.8125 -551603.875 -1031205.0 -706917.3125 -570518.875 -725798.25 -920441.375 -727672.75 -741134.75 -676340.75 -570348.5 -722185.625 -733125.6875 -597613.375 -744491.75 -696249.9375 -906519.1875 -721776.6875 -1299764.25 -735903.3125 -644665.25 -541209.125 -950091.9375 -720686.125 -997123.875 -961338.6875 -696249.9375 -708076.0625 -897907.9375 -736022.625 -919027.0 -906808.875 -703901.125 -651481.5 -720856.5 -748479.25 -1029500.9375 -727502.3125 -727502.3125 -736022.625 -772540.5 -716425.9375 -725798.25 -1139844.375 -654634.0 -968683.1875 -1203314.625 -656593.625 -741305.125 -573756.5625 -583980.9375 -736022.625 -729325.625 -578868.75 -663921.0625 -613992.25 -717278.0 -726070.875 -794471.75 -849683.125 -705349.625 -648260.8125 -722731.0 -961338.6875 -697831.8125 -669203.6875 -781827.625 -654634.0 -512580.96875 -721231.375 -722407.1875 -784639.3125 -757152.875 -934585.0 -727246.6875 -732273.6875 -766695.625 -690674.75 -768399.625 -766695.625 -727195.625 -802480.75 -1147512.625 -975823.125 -751359.125 -713529.0625 -745735.75 -578868.75 -642961.1875 -555011.9375 -688970.6875 -764991.5625 -738016.375 -696249.9375 -549899.8125 -549899.8125 -580402.375 -551603.875 -583980.9375 -715642.125 -708451.0 -744525.875 -776511.0 -816624.4375 -643642.8125 -604429.625 -534563.3125 -734318.5 -538823.4375 -760561.0 -712847.4375 -629158.375 -724366.875 -722901.375 -644665.25 -624878.25 -710291.375 -659831.375 -736022.625 -543697.0 -561828.1875 -580572.8125 -535347.125 -549559.0 -745122.25 -623174.1875 -798050.25 -646164.8125 -734318.5 -522242.96875 -639945.0 -553307.875 -556716.0 -540033.3125 -712336.25 -651481.5 -583980.9375 -756982.5 -624196.625 -672782.1875 -715573.9375 -1073826.25 -585565.6875 -595057.25 -620808.4375 -724435.0 -741305.125 -674486.25 -522242.96875 -754920.5625 -910029.5625 -750847.875 -559544.75 -825826.375 -786803.5 -732273.6875 -591700.3125 -562492.75 -922176.5625 -724094.1875 -757834.5 -1077595.25 -788848.375 -686605.0 -733602.875 -1009802.0625 -720686.125 -727502.3125 -1090847.0 -732392.9375 -530030.5 -740776.875 -751427.25 -675338.25 -735153.5 -769081.25 -1038021.25 -551603.875 -560635.375 -734318.5 -714426.4375 -530473.5625 -879714.375 -546474.625 -695786.9375 -737726.625 -540646.75 -649862.625 -538295.1875 -845474.125 -714892.3125 -1046030.25 -568184.3125 -644648.1875 -985826.0 -734744.5625 -725661.9375 -1041278.875 -1041278.875 -1099898.375 -771194.3125 -1002767.1875 -554807.5 -745991.3125 -731609.125 -736022.625 -892903.75 -733449.5 -663409.875 -736806.5 -782424.0625 -743588.625 -743588.625 -1152573.625 -721538.125 -709453.4375 -1077725.75 -769047.1875 -751785.125 -736976.875 -520981.96875 -713835.75 -712114.6875 -736124.875 -783242.0 -593574.75 -764718.875 +526424.3125 +527137.8125 +522576.40625 +545414.75 +520166.125 +537396.625 +569712.0625 +508069.3125 +432451.1875 +521763.5 +526069.375 +526427.875 +521600.21875 +517908.5 +521458.25 +521813.21875 +536580.1875 +498484.96875 +515068.6875 +476548.25 +530687.5625 +515423.65625 +546916.3125 +518263.46875 +584798.5 +521745.75 +527013.5625 +424897.3125 +538861.9375 +521742.21875 +490420.6875 +477641.59375 +501069.9375 +541552.625 +544786.4375 +530190.625 +473026.90625 +524298.0625 +519683.34375 +554292.6875 +527031.3125 +573400.25 +566872.25 +525717.9375 +517553.5 +522359.875 +526108.375 +517102.6875 +515317.15625 +586928.375 +525373.625 +539390.8125 +542976.0625 +526356.875 +521458.25 +478003.65625 +550966.5625 +541925.375 +546398.0625 +519186.40625 +585401.9375 +473381.875 +521813.21875 +484386.09375 +518075.3125 +548336.1875 +558311.0 +572864.25 +471962.0 +518334.46875 +466992.34375 +575924.125 +477109.125 +475462.03125 +520641.78125 +526605.375 +519399.375 +470542.09375 +521745.75 +523943.0625 +538518.3125 +534546.1875 +552727.25 +526960.375 +515778.625 +523705.21875 +519356.78125 +526250.375 +521671.21875 +517908.5 +524010.5 +467336.65625 +526214.875 +471962.0 +570599.5 +503909.71875 +541159.3125 +477180.125 +567440.25 +566588.3125 +523233.09375 +522168.1875 +522878.125 +525362.9375 +519434.875 +520783.78125 +526782.875 +585820.8125 +585632.6875 +569179.625 +493970.4375 +523960.8125 +515121.9375 +543366.5625 +586395.875 +515104.1875 +569211.5625 +523339.59375 +495645.1875 +568434.1875 +496071.15625 +519839.5625 +520680.84375 +521997.78125 +554136.5 +465501.4375 +543224.5625 +522193.03125 +525313.25 +525717.9375 +475937.6875 +573978.875 +517908.5 +518263.46875 +526889.375 +441995.71875 +520748.28125 +522168.1875 +572374.375 +561470.25 +573080.75 +516531.1875 +527066.8125 +527279.8125 +535302.25 +569534.5625 +520180.3125 +493970.4375 +526782.875 +522271.125 +515359.75 +519683.34375 +516864.84375 +528202.75 +567049.75 +521103.25 +504261.15625 +499912.71875 +522004.90625 +540520.375 +528202.75 +568114.6875 +521458.25 +549312.375 +528316.375 +536277.6875 +525494.3125 +524298.0625 +523233.09375 +525714.375 +564103.5 +529729.125 +522335.03125 +518263.46875 +567138.5 +520059.625 +570599.5 +545567.375 +553305.875 +542766.625 +517908.5 +477996.5625 +530687.5625 +523304.09375 +518100.15625 +518689.4375 +554558.9375 +529367.8125 +523233.09375 +527989.75 +499904.875 +572349.5625 +570954.5 +495745.3125 +515750.25 +574894.6875 +519683.34375 +472671.9375 +520073.84375 +522878.125 +596938.625 +574859.1875 +518930.8125 +521209.75 +580538.8125 +523577.4375 +513528.09375 +469771.78125 +518845.625 +551689.375 +521788.375 +546561.3125 +568789.125 +478848.5 +518618.4375 +488645.8125 +481191.34375 +513528.09375 +515991.625 +555535.8125 +521813.21875 +472377.3125 +469832.125 +515121.9375 +547981.25 +518653.9375 +524408.0625 +495390.3125 +520038.34375 +520038.34375 +521813.21875 +529420.3125 +517731.0 +519683.34375 +430818.3125 +548637.9375 +482721.28125 +531597.75 +549046.1875 +522913.625 +575569.125 +577699.0 +521813.21875 +520418.15625 +576634.0625 +550572.5625 +540171.8125 +517908.5 +519740.15625 +533988.875 +545490.0625 +515423.65625 +547310.3125 +519044.40625 +481191.34375 +557636.5625 +551673.0 +531354.9375 +548637.9375 +562825.5625 +518732.03125 +518976.96875 +531940.625 +526214.875 +475618.21875 +519985.09375 +521032.25 +528202.75 +556145.625 +528557.75 +528202.75 +519974.4375 +535657.25 +432415.6875 +484208.625 +525008.0 +517127.53125 +523836.5625 +576634.0625 +546206.375 +571664.4375 +555790.6875 +527847.75 +522228.53125 +513528.09375 +570599.5 +570599.5 +576953.5625 +570954.5 +577699.0 +517567.71875 +516069.71875 +523584.53125 +530247.4375 +538603.5 +546348.375 +581958.6875 +567404.75 +521458.25 +568292.1875 +526924.875 +516985.5625 +543331.0625 +519385.1875 +519079.90625 +546561.3125 +586218.375 +516453.09375 +549720.625 +521813.21875 +569307.375 +573084.3125 +576989.0625 +567568.0 +570528.5 +523708.78125 +585863.4375 +534734.3125 +546873.6875 +521458.25 +564838.25 +545578.0625 +571309.4375 +572019.375 +568544.1875 +516879.0625 +547981.25 +577699.0 +526179.375 +586076.4375 +552418.4375 +517553.5 +460844.90625 +578029.125 +580006.375 +541591.6875 +519399.375 +522913.625 +552773.375 +564838.25 +525749.875 +470503.03125 +524901.5 +572608.6875 +540520.375 +532391.4375 +521032.25 +579307.0625 +573222.75 +516812.34375 +519328.375 +526356.875 +417851.0625 +532817.4375 +511518.9375 +521309.15625 +491286.8125 +518618.4375 +520038.34375 +508169.4375 +521057.125 +566460.5 +522803.59375 +525022.1875 +552950.875 +521632.1875 +528699.75 +497165.1875 +570954.5 +572835.875 +521458.25 +604872.3125 +566552.8125 +464188.03125 +569886.0 +557210.5625 +522168.1875 +568672.0 +547644.0 +568182.125 +544613.25 +517411.53125 +498833.59375 +574408.375 +546557.8125 +486292.3125 +521546.96875 +519654.96875 +454064.875 +454064.875 +466276.0 +529139.875 +446042.4375 +571621.8125 +523889.8125 +520893.8125 +521813.21875 +466935.53125 +521277.1875 +550466.0625 +521976.5 +531479.1875 +523389.3125 +523389.3125 +433469.9375 +518795.9375 +560057.5 +505436.125 +528692.625 +525096.75 +522012.0 +564575.5625 +517191.4375 +516832.90625 +521834.5 +531649.5625 +579697.5 +527791.0 diff --git a/train.py b/train.py index 72fb5c2..fc8d14c 100644 --- a/train.py +++ b/train.py @@ -2,10 +2,8 @@ import torch import torch.nn as nn import numpy as np import pandas as pd -import sys -import torch.nn.functional as F import pickle -from torch.utils.data import TensorDataset, DataLoader + TRAIN_FILE_PATH = 'train/train.tsv' @@ -15,7 +13,7 @@ def read_data_file(filepath): df = pd.read_csv(filepath, sep='\t', header=None, index_col=None) dataframe = df.iloc[:, [0,8,11]] dataframe.columns = ['price','biggy','type'] - #print(dataframe.size[0]) + for x in range(len(dataframe)): dataframe['biggy'].loc[x] = dataframe['biggy'].loc[x].replace(" ","") #such dumb solution, well, but at least it works @@ -42,17 +40,17 @@ inputs_array_training, targets_array_training = dataframe_to_arrays(data) inputs_training = torch.from_numpy(inputs_array_training).type(torch.float32) targets_training = torch.from_numpy(targets_array_training).type(torch.float32) -print(inputs_training) -w = torch.tensor([7201.61492633873, 1,7201.500], requires_grad=True) -learning_rate = torch.tensor(0.000000000005) + +weights = torch.tensor([1.0, 1.0,300000.0], requires_grad=True) +learning_rate = torch.tensor(0.00000000001) print("training started") -for i in range(10000): - y_predicted = inputs_training @ w +for i in range(20000): + y_predicted = inputs_training @ weights cost = torch.sum((y_predicted - targets_training) ** 2) cost.backward() with torch.no_grad(): - w -= learning_rate * w.grad - w.requires_grad = True + weights -= learning_rate * weights.grad + weights.requires_grad = True -print(w) -pickle.dump(w, open('model.pkl', 'wb')) \ No newline at end of file +print(weights) +pickle.dump(weights, open('model.pkl', 'wb')) \ No newline at end of file