diff --git a/dev-0/out.tsv b/dev-0/out.tsv new file mode 100644 index 0000000..f88a8ec --- /dev/null +++ b/dev-0/out.tsv @@ -0,0 +1,1000 @@ +[77239.20627538] +[12174.61032325] +[49262.64560364] +[13719.09468101] +[24094.60322682] +[78831.88372284] +[44731.85980817] +[9445.11673982] +[-8775.67502277] +[13484.13521715] +[25123.54292194] +[82523.24716192] +[5739.49850727] +[1473.56315553] +[35893.29784707] +[24156.61382664] +[62832.77713693] +[94431.87764602] +[36316.57424734] +[6932.53866113] +[-48.78799069] +[7404.20208452] +[-8741.08566326] +[58501.8255941] +[-5318.33450647] +[69009.08198443] +[79095.89379122] +[12188.81037415] +[10168.62801905] +[37254.4992954] +[75971.48053176] +[63525.0818144] +[6658.01358076] +[49598.44155941] +[39198.50197904] +[59440.58970404] +[32540.59955929] +[24943.55508617] +[42595.65891726] +[71446.06228789] +[74940.54496611] +[28528.72234677] +[39057.39609124] +[68094.38631122] +[12355.50137411] +[121925.12622801] +[91830.77944794] +[9824.20041728] +[42892.43558432] +[50773.90575243] +[75051.48785955] +[-7257.48787813] +[95529.97271363] +[39512.21880917] +[11934.05374957] +[-6552.54554133] +[-4101.77479049] +[24977.65657684] +[71079.00384254] +[20681.00326911] +[62319.87973649] +[-10728.45205926] +[-646.38140892] +[73072.75340577] +[83081.11994674] +[28698.93586402] +[-7037.56626951] +[87264.04613442] +[33190.11234519] +[1884.53571772] +[20660.41844128] +[32992.96318181] +[18967.68359928] +[19523.66278232] +[167547.66766054] +[48549.94410481] +[62745.52497708] +[42096.78800159] +[66864.1130116] +[16652.04945762] +[47605.15589387] +[20351.69121932] +[45222.10626218] +[16632.3130624] +[17955.78799386] +[19287.9834327] +[56585.83789263] +[41008.24040933] +[40562.44177753] +[23521.72663349] +[41009.26407395] +[32697.09870022] +[55246.3184126] +[45324.01099759] +[3349.69209776] +[2651.36698748] +[64318.57029223] +[60186.76916545] +[36433.42928219] +[30100.94421797] +[6477.33211301] +[9337.18071906] +[10176.73268731] +[19691.78393505] +[5895.13194793] +[25133.87997887] +[26251.09310382] +[42408.18307706] +[63177.93437164] +[19739.13160353] +[76864.61910716] +[-15323.29095445] +[54252.88550829] +[59921.6154555] +[8744.3820705] +[40710.62455238] +[11756.93506914] +[34232.02679649] +[55888.09450221] +[26714.96470401] +[24416.54125024] +[30650.24339897] +[-24711.6768477] +[30210.92888143] +[66911.40960599] +[75109.96054041] +[-20169.28110217] +[44208.1611649] +[22083.67914501] +[46460.58082031] +[12363.74918991] +[-7609.95806935] +[45743.55018724] +[37835.52451926] +[-28849.34242952] +[62991.47164803] +[100418.69675065] +[56741.44175546] +[31694.52666656] +[62733.4737232] +[14749.12057626] +[51230.49589603] +[69818.84820503] +[17982.37485761] +[66275.15123938] +[51842.12585045] +[90877.18802705] +[14816.03895489] +[10818.14080495] +[57652.09472536] +[32220.35189758] +[18065.00499693] +[46411.25253865] +[-38790.77921082] +[74907.12944263] +[-13979.89929397] +[75781.8485021] +[17738.67616893] +[58732.10206382] +[60355.86535927] +[36382.53015122] +[67125.11593512] +[6722.45534002] +[-3564.1433294] +[3006.44260909] +[-6209.61681869] +[41504.91541816] +[38028.62102403] +[26221.13079455] +[81803.78436848] +[61213.92093158] +[71060.01406773] +[20127.41332558] +[22529.83488852] +[75049.8152461] +[36982.01717121] +[76843.91399801] +[95528.66564547] +[82135.12334015] +[74940.54496611] +[53215.73897212] +[33505.87781801] +[16613.64402974] +[-13981.81217371] +[21488.50949376] +[5521.27455682] +[81620.63836725] +[37928.13853618] +[10933.53035861] +[23498.24078983] +[-11782.8687834] +[39853.87723368] +[44221.58287122] +[62780.87500501] +[1502.81434101] +[54753.86773832] +[40962.62752924] +[57996.46382825] +[21573.77733233] +[37325.14022775] +[100436.06843845] +[95529.82748384] +[-6019.01332001] +[-18119.01178357] +[18991.25848867] +[21878.38726176] +[32395.36976359] +[64885.05644615] +[67648.33065796] +[32891.61016435] +[25611.81541046] +[6945.00220168] +[91665.05960447] +[42259.68918697] +[34567.82275226] +[77487.50970089] +[50274.42110408] +[61892.39661375] +[120091.62796917] +[53360.96876782] +[-14210.52183077] +[33713.66993148] +[26802.04997733] +[-9574.88944547] +[37526.97573307] +[26978.57960121] +[-1026.71787667] +[40298.32974476] +[39283.7698176] +[54308.98373455] +[6257.51476745] +[44483.95254692] +[25623.16948432] +[46580.50473456] +[-753.44690007] +[4598.14300515] +[71722.70071698] +[49840.92708717] +[13921.93452491] +[61262.87553057] +[36797.36919936] +[24831.43249398] +[21964.13035503] +[48547.76597041] +[37468.59618237] +[14610.78972845] +[13297.72762045] +[43043.65932676] +[30968.37768809] +[12309.01516901] +[54870.30106773] +[24088.60928007] +[49690.67623147] +[74596.8093383] +[12578.16164527] +[86243.45360843] +[32373.58529424] +[82544.11511295] +[33454.29905516] +[21766.2054421] +[67952.54194038] +[7679.10195275] +[20565.94976288] +[14556.809384] +[73228.00405737] +[27465.59929943] +[-2782.34821679] +[95529.39179445] +[2703.9951242] +[20119.43073269] +[-12609.70573211] +[24105.28351551] +[18875.80389259] +[17096.95954724] +[68733.14537261] +[15405.53231004] +[18148.22419279] +[149857.52301773] +[19171.62431595] +[24461.69901078] +[120994.61385839] +[62282.58596155] +[13289.685031] +[14892.61767384] +[74940.10927673] +[29884.70853707] +[78371.80159281] +[7639.75953511] +[33981.49867928] +[56498.70001521] +[27388.96310686] +[72976.39624354] +[38449.68481837] +[-636.29017677] +[27382.96916011] +[37766.82356158] +[43555.39584987] +[30097.54141318] +[28430.87755816] +[53805.93273482] +[23465.78597108] +[11475.29094969] +[3290.90825373] +[36849.7030162] +[14053.12778441] +[35215.56811248] +[5897.00198678] +[52486.23374615] +[39293.39478158] +[8593.7684486] +[4925.54502638] +[-23201.46557633] +[24439.03082858] +[-21228.61757859] +[68077.45079354] +[88769.68439312] +[2479.49143669] +[26594.22052526] +[47449.72862472] +[26022.03844485] +[45811.06803441] +[48858.84510129] +[23796.93684802] +[21549.08826706] +[57779.46924938] +[76356.55815597] +[17345.43902175] +[44600.66654867] +[60323.9563717] +[30416.12063425] +[28810.55029216] +[64522.18025539] +[3939.83198308] +[35248.63536635] +[-2005.95799439] +[42539.37633656] +[41750.62770171] +[30092.14860874] +[52959.80622075] +[63507.02398348] +[130497.86878315] +[87259.96208805] +[44945.68320699] +[66278.37799517] +[13045.82501402] +[65108.69997573] +[14770.05606034] +[3971.72086782] +[54569.82062044] +[39275.72722816] +[58686.21539121] +[14664.75773883] +[48595.86664252] +[32765.69230334] +[51616.61930616] +[63790.15953367] +[8276.69537097] +[4444.70402984] +[54889.90291733] +[21269.28120475] +[94454.25561692] +[41792.60781859] +[-912.32940176] +[48798.88314416] +[58255.0345349] +[78371.65636301] +[179254.2781327] +[68077.59602334] +[54604.55629891] +[8519.10622152] +[30860.44166733] +[31243.92589641] +[-24088.25047434] +[70576.62225506] +[81803.2034493] +[42172.2805526] +[28310.9875546] +[47427.62650471] +[76763.96924431] +[37111.31682894] +[-13229.7546658] +[38511.14040866] +[36700.93332329] +[51170.5339389] +[-3825.18514512] +[27772.65400405] +[18842.9707299] +[-14937.40375795] +[26434.95419337] +[-1663.57903532] +[50162.54189371] +[71426.78769181] +[48354.56211108] +[23766.84986049] +[7402.67889756] +[65919.32480066] +[21322.86538493] +[70490.04207031] +[44736.08658528] +[34758.38891234] +[51808.77737956] +[36874.82524793] +[87619.61559987] +[60900.0252493] +[53775.15490257] +[26413.895873] +[-604.99034858] +[19471.96658949] +[80051.75956032] +[81448.61503985] +[45231.24760194] +[6548.58499201] +[19309.4735018] +[238485.46496223] +[98960.93888074] +[120329.79699325] +[112266.68696735] +[10604.31740613] +[44488.05740112] +[46757.03435844] +[43194.88306921] +[65819.43136935] +[67632.3429823] +[78371.07544383] +[58702.58232378] +[48641.28162477] +[51335.79421754] +[-25589.57082766] +[55248.95611184] +[43045.70796946] +[39852.98011348] +[74479.84015718] +[55817.86636113] +[28368.27790178] +[4325.56373818] +[74940.10927673] +[20309.2219761] +[42484.78193103] +[27574.12437673] +[66106.66420494] +[31911.17923918] +[57603.46307106] +[23404.56991019] +[68077.01510415] +[61214.50185076] +[112895.81231864] +[44066.56773654] +[95932.17438277] +[65323.78254807] +[66096.61579769] +[61670.08116026] +[29210.96735595] +[7021.5465774] +[17919.77520123] +[25067.33501845] +[47263.60150026] +[9236.10369654] +[65109.12366747] +[50699.20268676] +[30855.44200774] +[78023.97589571] +[13678.16879165] +[25127.88603212] +[24592.30321373] +[8670.40464117] +[39811.91920594] +[13547.03741888] +[81803.2034493] +[42058.70523793] +[39503.58716317] +[27580.11832348] +[17667.9844826] +[79926.75203466] +[69840.52928441] +[23433.10254742] +[52210.36527598] +[28521.51294832] +[19367.44066171] +[14996.21776876] +[58284.74528523] +[-23850.97836223] +[45284.11686201] +[23103.85512342] +[20196.06692526] +[17878.06396731] +[24914.0626333] +[52227.69425104] +[47263.36599135] +[32747.83995481] +[25824.32174562] +[44213.54028177] +[47900.28892458] +[78371.65636301] +[24094.19799621] +[19025.82065711] +[36952.05049704] +[63618.9658734] +[41422.87433538] +[76628.67543958] +[293.00191183] +[64109.89437797] +[26187.37691684] +[34206.72091505] +[24920.05658005] +[60601.12462957] +[59203.65372771] +[66431.65038032] +[7915.20970356] +[89329.4866767] +[32277.65962469] +[-30570.02085221] +[106293.61845641] +[72614.02783234] +[20465.31792061] +[196907.66490834] +[49853.96965675] +[18372.00592803] +[47300.44472881] +[35829.55454913] +[-28515.0060599] +[23583.73723331] +[50247.91700671] +[105426.26097697] +[16008.53061847] +[25737.76869588] +[94006.97251431] +[-12346.52467419] +[93311.73953383] +[71176.95928544] +[68678.69091885] +[58684.42187968] +[27801.98431175] +[94876.5838628] +[12808.07022299] +[79110.80060099] +[11973.39616721] +[73858.87344778] +[6401.28497699] +[65255.31591372] +[41777.53907205] +[74786.09027118] +[68465.25184684] +[27312.32691429] +[-1655.61112308] +[12913.3685445] +[5987.67471555] +[46140.82433531] +[19611.48728359] +[67069.79991373] +[74940.10927673] +[52267.72400538] +[56632.66046567] +[12981.96214762] +[28192.40196023] +[16410.40167826] +[2931.85505922] +[18578.62070548] +[-13483.0571583] +[2245.63755493] +[54322.98345279] +[136788.0863624] +[84073.63831901] +[1469.14536814] +[40528.23832248] +[41240.35076476] +[-27550.15026754] +[55433.52832517] +[21722.87809115] +[-5713.33907933] +[1691.33185839] +[73818.72659971] +[36178.33399902] +[92452.46669189] +[65829.53544832] +[81943.88399548] +[55823.29229133] +[49396.47656238] +[90877.18802705] +[30278.8587508] +[63301.96172237] +[-5039.69852508] +[55665.29041097] +[-21661.85113812] +[58240.30411069] +[72641.98031918] +[14251.69919533] +[6870.06433182] +[36350.51177477] +[63168.00127191] +[22129.97992237] +[-659.54741551] +[24606.92880647] +[74769.1128416] +[14488.22811494] +[45913.72865667] +[63207.9327461] +[67869.38801909] +[128197.83621248] +[51465.75865816] +[2826.55673771] +[27314.37555699] +[70253.9343195] +[44105.88547803] +[63019.54472043] +[14105.73125301] +[34775.61486572] +[12658.87983384] +[-49051.49868034] +[25068.51313154] +[55895.24214195] +[46329.38756081] +[15910.93199906] +[-2068.55765077] +[56479.38808052] +[42382.13199294] +[41449.83105339] +[26586.17793581] +[22078.06032254] +[54155.71134941] +[42518.55772179] +[201668.94833807] +[14318.28149436] +[-20010.3553751] +[56414.81577212] +[38037.0408602] +[17951.11955236] +[39380.43649312] +[48325.31092559] +[11040.00679321] +[69391.9470027] +[-2852.03088712] +[132499.93693891] +[90045.45272618] +[-1006.02365998] +[26532.06778714] +[-2504.24703785] +[30210.92888143] +[-1066.22818205] +[67633.42022005] +[25968.57413749] +[39779.95240833] +[-6072.39227384] +[20647.84149124] +[23271.19851628] +[34061.49111935] +[21454.85174174] +[49233.9834747] +[32856.36503211] +[58027.52846006] +[55183.51352987] +[56957.1870762] +[21814.87926461] +[26878.6861699] +[42599.92735023] +[61860.93311066] +[23911.49059964] +[55450.79161716] +[89919.34914121] +[87462.61623187] +[40047.21257101] +[50958.12770985] +[1259.7024181] +[45049.50059787] +[24997.34645495] +[33549.1655397] +[39620.84501784] +[16789.23666386] +[13753.44749048] +[8738.96090569] +[88345.26435128] +[49794.55704681] +[32264.66294747] +[8068.27686236] +[86938.00107026] +[25363.78855658] +[34623.51627641] +[30728.65935128] +[80465.56160884] +[30629.94403307] +[44844.67342129] +[-38946.83452501] +[39144.53396866] +[16763.34172588] +[116092.77265455] +[76162.04669184] +[50356.11314043] +[63557.99382708] +[30601.28190412] +[36139.45556691] +[-9834.3304257] +[11345.23324259] +[11168.35712712] +[7502.57232887] +[52976.02063532] +[48066.15116239] +[-930.84705356] +[-14764.10088986] +[94134.55518782] +[1693.38050109] +[70132.06463175] +[-4133.59244981] +[33138.78203405] +[95433.54012929] +[40215.69960545] +[21579.77127908] +[50444.38496043] +[57213.57964844] +[95529.39179445] +[33346.35298298] +[-15864.04192906] +[13886.28153512] +[-28906.6666874] +[21997.15569699] +[51979.31305669] +[7126.84489891] +[35888.91401044] +[-12354.56726363] +[59952.91528369] +[129480.0821002] +[45949.60183394] +[58589.24141282] +[-2877.92582511] +[41499.51052796] +[57781.50246652] +[-3279.96124837] +[1824.57376059] +[55671.7526043] +[14264.99732057] +[22582.34331274] +[-3084.57716408] +[26850.32730719] +[80001.27079409] +[103130.47159428] +[19195.54353429] +[1715.04693171] +[81803.3486791] +[-1211.80991557] +[27969.88228964] +[24173.87711863] +[1309.61048169] +[26503.51045789] +[22832.2823734] +[90940.08873909] +[62655.67569226] +[-3620.15998248] +[46395.34346468] +[51280.70985278] +[42983.10831309] +[54668.03692907] +[16453.44070809] +[57774.46834828] +[-30762.63565499] +[44618.51889721] +[76055.75189678] +[7778.95804546] +[68077.01510415] +[41921.16337884] +[-12788.24534662] +[-42765.65846639] +[29928.51187949] +[12500.93639615] +[12765.9807733] +[23530.35827948] +[108538.30251273] +[26144.49460198] +[46107.09005597] +[29091.94920373] +[32630.19400917] +[-35983.73624014] +[40883.66638653] +[-25073.36774146] +[36293.90606515] +[33658.53338699] +[35644.98233579] +[54236.36883671] +[8619.07433004] +[-25506.07882447] +[17760.50886934] +[39426.9509706] +[17347.48766445] +[22818.24583721] +[37346.42481447] +[-60777.81835665] +[60623.07536871] +[49502.89410564] +[4304.6586807] +[71386.43626633] +[59392.02658386] +[26227.1247413] +[13279.0047423] +[57928.42194307] +[7419.90485094] +[-9840.9881062] +[34691.69197056] +[172638.30759877] +[-16531.73592658] +[19762.42618087] +[79650.53004116] +[61213.92093158] +[17745.8832766] +[-11618.00687943] +[6050.27437192] +[61909.49623084] +[16327.19971816] +[23521.72663349] +[3330.25067137] +[29470.74336676] +[35140.69934559] +[58404.85452297] +[73449.97615079] +[-6431.44546835] +[60323.9563717] +[74816.82151425] +[6517.08774644] +[38634.2570317] +[28001.75393861] +[12783.35339809] +[6845.01695352] +[79784.74899476] +[57781.50246652] +[35790.17479289] +[29766.60784835] +[2676.05154352] +[36683.6700313] +[23308.49229122] +[67633.42022005] +[46101.52762579] +[-3997.51814616] +[57779.46924938] +[91872.33668207] +[20927.30747629] +[47705.04932518] +[51201.83376709] +[72866.92503817] +[4011.06328545] +[42545.3702833] +[59377.99004766] +[15833.17910768] +[-9635.13261962] +[46614.22884235] +[19822.388138] +[37636.09873289] +[65628.92286712] +[37960.93936594] +[4518.97107772] +[37324.00195231] +[33048.90384422] +[65546.23506995] +[20984.22650356] +[22781.33589247] +[30290.03892213] +[33925.69201781] +[28183.70568845] +[54693.34281051] +[62867.61110373] +[58839.76953002] +[11156.57445997] +[49387.90954217] +[21395.97481531] +[-2548.40528914] +[20474.53862315] +[13403.61499851] +[-10956.20031488] +[41602.76020677] +[22283.25207536] +[-15082.63355364] +[22064.57576032] +[20785.02869748] +[29339.55010726] +[14922.15679599] +[69967.59863601] +[48707.62135885] +[35796.20607824] +[35507.79512955] +[7080.91947798] +[95529.97271363] +[44755.11704691] +[128153.17217563] +[61195.33514587] +[75587.61708569] +[33442.71639227] +[26283.73045093] +[59964.90317719] +[18019.079576] +[40153.09994907] +[80095.64626196] +[45370.10324883] +[50589.02569958] +[96959.87720989] +[10666.32800596] +[3066.7578494] +[25503.61346208] +[562.84196372] +[25942.65909666] +[37111.31682894] +[-53110.3841019] +[38328.07528378] +[-16799.57060106] +[59061.63551829] +[81803.2034493] +[49294.53448837] +[26867.83765705] +[78371.65636301] +[-2103.0832175] +[25962.36954233] +[38895.35553623] +[-15282.42041626] +[15613.77587487] +[45720.70195958] +[94985.90347904] +[60135.43885432] +[115377.41582052] +[92616.65042964] +[60180.77521871] +[20032.53216039] +[-15495.65475853] +[26655.1677032] +[15795.29627619] +[25500.97576283] +[29704.59724852] +[88504.24946614] +[78371.65636301] +[392.95996892] +[29939.134126] +[71192.93381004] +[77925.42377967] +[95529.97271363] +[35425.16499023] +[14665.95595476] +[14670.75168557] +[59164.16664885] +[41662.818626] +[29656.50036461] +[55948.21038705] +[12942.83941285] +[39010.57351821] +[65470.87875448] +[80683.61045543] +[61070.87043972] +[54384.6992121] +[-6981.06482294] +[-12594.59891808] +[27520.15636635] +[86168.26971382] +[39656.85954831] +[72231.74348495] +[64253.2034449] +[-13343.69181765] +[7428.84259033] +[88603.07589535] +[28727.33109629] +[36385.16785046] +[11752.10199973] +[-5968.18036858] +[32483.2753014] +[63460.11475947] +[68931.85673531] +[21122.00696305] +[20419.98155622] +[19880.76799294] +[3521.55616365] +[61040.28467475] +[40262.46779636] +[82322.24912468] +[67004.52697364] +[21444.46224905] +[21212.67549512] +[72134.79273306] +[74905.79380586] +[5068.5004816] +[54610.71267118] +[74120.78696267] +[46919.19042925] +[39648.81695886] +[48034.8938148] +[36379.17390372] +[89.8588017] +[74940.54496611] +[25067.92407499] +[10612.94905213] +[44807.54469063] +[77922.19702387] +[75754.08036969] +[2699.57733682] +[11270.50442747] +[14075.7959666] +[67286.2388666] +[75947.0449239] +[68596.06077954] +[39244.42739997] +[33697.36049642] +[5978.28942528] +[45382.00030269] +[45292.99603844] +[-28765.67951116] +[17348.09682384] +[71820.80591477] +[74178.51155763] +[41522.76776669] +[118171.63708968] \ No newline at end of file diff --git a/skrypt-dev-0.py b/skrypt-dev-0.py new file mode 100644 index 0000000..c539f13 --- /dev/null +++ b/skrypt-dev-0.py @@ -0,0 +1,41 @@ +import numpy as np +import pandas as pd +from scipy.sparse import data +from sklearn import linear_model +from sklearn import preprocessing +from sklearn.pipeline import make_pipeline +from sklearn.feature_extraction.text import TfidfVectorizer +from sklearn import linear_model +import csv +import pandas as pd + +regression = linear_model.LinearRegression() + +train_file = pd.read_csv('train/train.tsv', delimiter='\t', names=['price', 'mileage', 'year', 'brand', 'engineType', 'engineCapacity']) +train_data_frame = pd.DataFrame(train_file, columns=['price', 'mileage', 'year', 'brand', 'engineType', 'engineCapacity']) + +Y = train_data_frame[['price']] +X = train_data_frame[['year', 'mileage', 'engineCapacity']] + +regression.fit(X, Y) + +in_file = pd.read_csv('dev-0/in.tsv', delimiter='\t', names=['mileage', 'year', 'brand', 'engineType', 'engineCapacity']) +in_data_frame = pd.DataFrame(in_file, columns=['mileage', 'year', 'brand', 'engineType', 'engineCapacity']) + +reshape = in_data_frame[['year', 'mileage', 'engineCapacity']] + +y_predict = regression.predict(reshape) +y_predict = np.concatenate(y_predict) + + +labels = np.array2string(y_predict, separator='\n', suppress_small=True) + +file_out = open("dev-0/out.tsv", 'w') +file_out.write(labels[1:-1]) + +with open("dev-0/out.tsv", 'r') as fix_space: + lines = fix_space.readlines() + + lines = [line.replace(' ', '') for line in lines] +with open("dev-0/out.tsv", 'w') as fix_space: + fix_space.writelines(lines) \ No newline at end of file diff --git a/skrypt-test-a.py b/skrypt-test-a.py new file mode 100644 index 0000000..fe5a907 --- /dev/null +++ b/skrypt-test-a.py @@ -0,0 +1,41 @@ +import numpy as np +import pandas as pd +from scipy.sparse import data +from sklearn import linear_model +from sklearn import preprocessing +from sklearn.pipeline import make_pipeline +from sklearn.feature_extraction.text import TfidfVectorizer +from sklearn import linear_model +import csv +import pandas as pd + +regression = linear_model.LinearRegression() + +train_file = pd.read_csv('train/train.tsv', delimiter='\t', names=['price', 'mileage', 'year', 'brand', 'engineType', 'engineCapacity']) +train_data_frame = pd.DataFrame(train_file, columns=['price', 'mileage', 'year', 'brand', 'engineType', 'engineCapacity']) + +Y = train_data_frame[['price']] +X = train_data_frame[['year', 'mileage', 'engineCapacity']] + +regression.fit(X, Y) + +in_file = pd.read_csv('test-A/in.tsv', delimiter='\t', names=['mileage', 'year', 'brand', 'engineType', 'engineCapacity']) +in_data_frame = pd.DataFrame(in_file, columns=['mileage', 'year', 'brand', 'engineType', 'engineCapacity']) + +reshape = in_data_frame[['year', 'mileage', 'engineCapacity']] + +y_predict = regression.predict(reshape) +y_predict = np.concatenate(y_predict) + + +labels = np.array2string(y_predict, separator='\n', suppress_small=True) + +file_out = open("test-A/out.tsv", 'w') +file_out.write(labels[1:-1]) + +with open("test-A/out.tsv", 'r') as fix_space: + lines = fix_space.readlines() + + lines = [line.replace(' ', '') for line in lines] +with open("test-A/out.tsv", 'w') as fix_space: + fix_space.writelines(lines) \ No newline at end of file diff --git a/test-A/out.tsv b/test-A/out.tsv new file mode 100644 index 0000000..125c0f6 --- /dev/null +++ b/test-A/out.tsv @@ -0,0 +1,1000 @@ +24011.9730875 +23563.70675037 +11560.96401886 +-8533.2935498 +-6064.34968439 +20297.41994272 +40399.58014905 +19425.3400962 +118423.76525757 +47261.31734865 +-29452.34073794 +44114.84506639 +-3817.34648445 +30715.17453303 +-25260.57765404 +-7549.99611222 +44891.12614006 +66214.14981563 +35059.45280175 +14874.7204984 +60027.50283356 +17819.88176992 +-4858.6345406 +44981.84542612 +5040.2315696 +23606.95713345 +37982.6956031 +34209.91319932 +73675.60577968 +25772.89107993 +41668.27877941 +21488.50949376 +23453.13303036 +9008.24923964 +70745.97507772 +13255.15844702 +53940.7944783 +46556.81036482 +70878.42244099 +34932.86989352 +12608.87241691 +50489.72132481 +37319.146281 +67694.38194246 +66611.19954735 +32927.15193917 +37068.31956684 +8783.22830571 +27645.06988878 +43646.65763519 +40892.28569846 +87031.22515984 +13285.1772929 +46445.31683476 +-4659.43673453 +30584.01861213 +66771.88135924 +32953.39339263 +72493.20225675 +95528.66564547 +20899.54772154 +79272.4234151 +63680.32685157 +26488.3331472 +65225.67673339 +69025.43701546 +-4741.45771446 +-1898.02197363 +42993.89484309 +78372.2372822 +49971.36445981 +94431.87764602 +27795.990365 +76203.28577083 +47630.46177531 +19693.83257775 +22281.12857911 +16089.98238866 +84355.46626441 +35494.72846041 +15226.74881711 +45721.62409234 +64552.42196358 +44168.20391738 +39939.27655025 +76490.76837161 +84424.05986753 +16063.08768539 +34552.60810297 +46943.36055818 +13240.6046644 +58805.11345433 +75707.20038711 +47089.60355842 +18453.30937693 +75068.80192941 +20906.54651136 +7892.92535157 +63516.06214151 +39830.75147295 +74940.10927673 +56185.70173334 +6799.68058913 +25837.36077515 +33178.12445169 +69085.95506345 +54466.67328246 +8214.68477114 +43123.06271029 +19134.95518202 +26978.57960121 +-1163.30597495 +58809.232853 +21328.61676672 +6223.4263719 +79100.84606079 +539.58472498 +74940.25450652 +-10697.66661041 +44809.08505729 +22804.20930101 +11704.14517186 +34069.25810621 +-2676.26892364 +13457.58300889 +16965.76628774 +29608.32531954 +1679.34396489 +61718.90398491 +44119.6407972 +23119.93743523 +15380.55960895 +35445.19547317 +7704.29090066 +112217.56272659 +76040.07413489 +28903.86072018 +46161.78817988 +51905.44405508 +31441.06477608 +35846.22878457 +29528.06762464 +47918.8353854 +-22487.8935479 +33824.99953834 +23495.45375207 +122270.38219145 +43057.69586296 +33389.89920781 +10384.50006056 +58856.17939173 +73556.49234267 +73568.86731806 +29937.73258203 +-7094.99479045 +117580.5518212 +45973.56112209 +28280.96142051 +40665.42552873 +24597.2973952 +25671.89943481 +18707.34572299 +56393.62455602 +-9732.97022389 +62695.0181099 +43011.84838707 +26795.15102945 +65784.48950334 +44290.76553089 +62502.40330712 +61473.80684376 +585.59487454 +24888.75675186 +54996.14359473 +58728.47726176 +14548.19007207 +34391.49835473 +61042.76481014 +82414.2796756 +62652.72467537 +45873.66769078 +51939.48275407 +24629.59698866 +96155.40590575 +53010.5472193 +70895.91420972 +35735.65506456 +39156.64441012 +93924.74778182 +22912.14532177 +26285.10268151 +10399.12565331 +3160.36867656 +17507.34305289 +14926.22202093 +10031.4408128 +56519.30231894 +44641.1870794 +11056.68102866 +41177.71376978 +96509.07227082 +27781.36477226 +19637.7133115 +56943.15054 +77542.69702325 +66045.24266166 +24754.75896281 +8331.03192214 +36585.39459917 +18403.95303129 +25569.56936595 +-17130.50357329 +22955.43304345 +42070.92144785 +32630.55736794 +1329.53157576 +56040.47193764 +31532.03357887 +38602.95720352 +13449.54654634 +25990.63316029 +14261.75177541 +70965.5603184 +7633.20429144 +-8066.26699592 +9214.03004901 +-10221.4566926 +61442.50701557 +15205.74544742 +50091.32571267 +-32226.92150543 +1131.86012809 +53143.56537809 +61631.02453295 +43127.67437503 +5605.87866164 +46491.88064849 +23834.1575716 +59321.38433804 +52264.49724959 +-26053.0998768 +-1097.04417791 +62511.94692218 +-7157.63178542 +20785.02869748 +28839.65095368 +51198.6070113 +124383.0027147 +45061.48772257 +38541.53566023 +20037.59644577 +41262.946232 +69923.6458671 +57650.95321425 +60123.1697438 +76456.42716717 +22949.43909671 +38281.16044534 +78372.2372822 +89874.92827791 +26881.35291032 +85627.82450448 +70007.04366682 +1556.15595624 +57285.32734033 +30523.35769709 +27750.06494407 +44055.89504055 +10800.87751296 +66721.49349996 +26984.57354796 +8235.49777148 +38712.58883209 +71239.24306117 +-1663.57903532 +5430.01277151 +14191.11084306 +19729.07770999 +81631.62609499 +51436.01621584 +43066.32750895 +17530.88251761 +54377.57733768 +45347.0197846 +33585.12253248 +39355.00111997 +58534.83789728 +78372.2372822 +6346.5882947 +42684.60613225 +34779.59750838 +39711.41661524 +34863.64603496 +23316.53488067 +47105.24330103 +12791.39598754 +48160.41853896 +45999.14172503 +26870.64358045 +44076.94213207 +87405.29197399 +33878.45224052 +111818.82650962 +71683.62479552 +94183.118308 +59972.94576664 +40437.56559371 +4021.79906147 +81707.64224373 +28612.29189452 +36094.70825907 +-6624.90698177 +56687.21753259 +51352.44630779 +13343.06398483 +63878.06507149 +24188.79064804 +-11839.60398473 +37584.29999095 +44350.72748801 +76256.66472466 +41142.71120249 +91554.07517573 +18596.23772919 +16750.46606701 +89262.91046467 +32879.62227085 +21725.00107477 +50419.07907899 +11268.45578477 +-38779.52560367 +3658.59309424 +53252.62062059 +69760.15301414 +58121.663141 +34561.1267561 +26137.5956541 +-8921.43807516 +71249.76941415 +64165.84381037 +59421.78525271 +45658.56407845 +39650.00202374 +123241.65439693 +78370.93021404 +11714.23640401 +12686.03951959 +27628.09238711 +89321.58330213 +39589.44405828 +62307.14740911 +56891.05682939 +78180.46380779 +3633.2872128 +41078.44673362 +25799.47794367 +43592.04617825 +12337.96103791 +37167.94159226 +48721.65789504 +62100.22045139 +13731.36836483 +13073.22393294 +26735.42902623 +-7226.18804994 +38273.15519449 +64934.01605899 +36132.00203401 +32671.79281878 +60900.74768203 +56771.89631461 +129845.4435765 +27400.2324521 +23497.58992681 +24381.7404814 +43898.5505585 +56934.3894023 +61214.06616137 +-1831.47701321 +14646.31607771 +81803.2034493 +21605.07716052 +42829.83592794 +39404.86790429 +25335.12642764 +25238.16196415 +28375.217368 +6625.53016136 +608.17832811 +637.42951359 +790.70189874 +33040.93724544 +49464.37849578 +19118.90734172 +32740.66763893 +42971.484315 +37257.34116356 +57626.31600817 +59167.52598784 +33266.74853776 +77033.35299936 +-6460.73399244 +46964.87225211 +50313.19170093 +20471.9009239 +-5554.07274743 +31030.94000586 +7189.00480523 +19373.27137411 +42305.9276854 +52170.46827332 +52999.27787406 +62940.1413369 +67670.89622698 +59552.16318932 +48064.10251969 +5232.82099152 +70117.95799165 +83986.90657703 +23623.88983999 +53444.18544075 +29331.50751781 +68077.01510415 +7559.79397358 +56527.74597435 +30043.6534703 +35337.25945242 +60950.21191886 +95239.65835204 +41241.49440632 +34958.17577496 +14642.66137742 +61213.92093158 +-5867.20052102 +8012.84926582 +31156.89520546 +35368.5592806 +91366.04410172 +61274.60903769 +25363.34305607 +95529.39179445 +72009.25143795 +27941.80921724 +-11455.98594668 +20222.2688536 +62310.76054192 +17841.86611552 +30364.79032312 +46160.10598745 +41027.11642248 +-22926.22063423 +22977.5121691 +-31991.01898096 +26356.01337776 +13885.12719335 +66544.12345268 +-10736.4199715 +25290.37911981 +99214.96033788 +25941.86481377 +20719.29035402 +3153.72104748 +23034.80497515 +16017.75132101 +34944.10190016 +4637.90788916 +44144.51660369 +52834.36300569 +-18759.93026208 +-35849.14365222 +45642.96277981 +10022.8091668 +76230.64029497 +35418.50574796 +56689.98472355 +-5646.7941189 +51058.02037236 +42184.5036744 +15029.80488009 +51460.99353029 +-297.13797349 +75214.0317251 +126118.01476485 +81739.43489852 +8220.05232274 +93417.03785534 +38116.93179246 +52042.7179123 +46121.55810874 +44090.38961172 +-18366.15309838 +29527.57052097 +25532.27559102 +20374.64519184 +57263.28641019 +35507.79512955 +29414.13765713 +65047.94602649 +75553.77298492 +50603.65129232 +30860.44166733 +75371.07588824 +8152.08511477 +58178.85790717 +3923.74680419 +18494.70043726 +57384.11532558 +37333.1828172 +-52159.21367699 +51796.44952201 +68641.02145108 +-13769.07105839 +84018.72317935 +57721.5520665 +44134.13929288 +131033.45160155 +25922.62861372 +94431.87764602 +17422.07521432 +53514.24115296 +67248.36780062 +39933.28260351 +39873.38134765 +23245.89263484 +105823.01644474 +-14191.22429653 +6767.7917044 +-13539.66286793 +-5566.46849848 +35545.08890448 +17125.62167618 +47895.88689115 +-32952.48142735 +51184.5704751 +33744.62326807 +28085.86089984 +12309.19212298 +94896.9160342 +79942.31770865 +59766.43461159 +54377.57733768 +43530.27779097 +24432.19017119 +78372.2372822 +51832.0346183 +3590.58854766 +32654.52952679 +31233.53139804 +118067.78163131 +56555.26862637 +40596.8319256 +61405.93178889 +39488.96157043 +95344.95667355 +38449.68481837 +75858.38460443 +50844.26678123 +40153.09994907 +66149.88706071 +23966.04766657 +-17875.73132426 +28773.32114301 +-19598.79375637 +12256.38498993 +90911.2686458 +71571.01772222 +68533.46112316 +13383.40068963 +50169.93455726 +73755.48216731 +83203.58778915 +52424.58199586 +11469.0384998 +46875.2668377 +90465.23357596 +29003.75415149 +93348.1048008 +58050.43183863 +-3854.04115142 +85226.84503857 +11400.31434753 +5782.48296273 +48400.85341372 +38700.80199213 +-8397.24711804 +103821.97161718 +26520.22203194 +29186.27772212 +91449.58379144 +-8731.51535374 +124144.46249099 +4632.31917302 +79774.88680791 +51757.44706843 +174301.83948634 +-14265.8118464 +-2700.80714468 +22088.64300374 +31275.77744254 +49690.22457988 +28810.55029216 +10748.25707292 +476.93429074 +340.97597546 +39856.64641093 +11668.90003962 +31210.2741593 +33565.2507186 +58367.37542455 +5149.26058207 +59523.21984336 +51369.66580572 +54409.15838289 +90760.95580726 +-3582.09854714 +57192.52550088 +8741.046887 +12005.28505194 +-10244.71393134 +20764.99821454 +59540.95549051 +29492.8224924 +23716.92923069 +94317.15868979 +10552.89933882 +42143.13198028 +16413.50923391 +-25147.36623479 +37150.65924657 +75594.79252524 +36122.71294152 +-9430.37338459 +63948.70731731 +32787.77142899 +57419.36045781 +52398.38568195 +55280.86509942 +33168.34891582 +54503.38785217 +33457.90375438 +88822.48945993 +30658.85748081 +60249.36882183 +40647.12055955 +32853.72733287 +112299.64114797 +23821.96151244 +25624.12643288 +24019.13741033 +-15402.38166912 +112647.92190068 +5913.04982707 +63734.75159145 +64618.64446778 +50136.09960297 +104597.92427605 +-15131.2864403 +81802.91298971 +84493.43457032 +8084.08056819 +84018.53313839 +816.00778018 +56440.12165356 +12309.15478438 +-63390.77656606 +2515.1125341 +20666.96215962 +40306.37233421 +144613.16741212 +40092.5489354 +-3962.53894154 +62056.74801482 +-12415.11827731 +-9985.55416814 +38682.79911189 +38777.4381847 +77033.06253977 +72820.06377288 +54402.88321912 +30674.68092117 +30641.93192656 +17666.60938478 +80089.7823197 +19067.57703059 +-10474.87287496 +43756.74491182 +5424.01882476 +82283.00957626 +37028.68668962 +8513.09681704 +17848.09127823 +23597.78801791 +5292.82556526 +24546.96684934 +34024.26092907 +-16330.32881431 +5728.51495235 +9595.67674851 +1809.19970547 +77239.20627538 +49225.94088525 +4897.06765236 +81803.63913869 +8348.86638613 +-34639.81137915 +43757.53462141 +63088.79608258 +76066.09856458 +67882.19996528 +52586.45741821 +3067.01651286 +31968.3120225 +23887.43882197 +89231.16610501 +32647.2626869 +26474.39922418 +53873.29434747 +74940.54496611 +1081.75054667 +11606.30038325 +26648.18853564 +81004.29348613 +90194.99529344 +15600.71971384 +95528.66564547 +-1447.70699381 +70894.43162921 +91003.19910648 +64826.08003823 +906.64317034 +32907.69534325 +97936.42481386 +27733.39070863 +69724.73862475 +69880.46075859 +5973.63817935 +35790.21213149 +53651.4283592 +38565.07437203 +36910.98543271 +38526.32101094 +63888.11896504 +31691.29991076 +78371.65636301 +37532.96967982 +29644.63529139 +17148.28985837 +6845.01695352 +51999.05218309 +13975.90253529 +29762.01091246 +35590.42526887 +-1756.20788535 +36162.08564171 +8593.7684486 +75243.56412762 +64523.19686396 +57554.70538483 +26834.70873287 +84720.59939183 +9900.2475533 +55359.52983185 +70589.33972544 +75518.98257189 +-39730.8604326 +40458.36373705 +95529.82748384 +-625.30662185 +48119.06247051 +56775.25256211 +123975.77128764 +40803.99764392 +4500.72068292 +1257.10205746 +68077.01510415 +23393.17107324 +14365.66650144 +84122.3309309 +28904.44977672 +22003.47277267 +-1507.66895093 +64492.33272516 +57142.12710159 +121985.91654681 +47414.58973379 +13945.19176365 +35398.37400534 +44060.06267027 +50028.72605629 +64387.65622549 +-13515.85005096 +20377.7627989 +43196.93171191 +51199.17811935 +20583.78224871 +29843.83309747 +8377.97239776 +107129.18966429 +18047.74170494 +62832.20531614 +-3845.97127479 +77053.70830115 +22778.23968582 +30324.85884893 +57452.7089287 +3381.5809825 +45624.59859116 +-14425.66723484 +42767.23627157 +71067.73449729 +24774.82678436 +109899.36556289 +34138.12731192 +43103.25339188 +28215.02346513 +3137.63586859 +81803.2034493 +25339.9422613 +35064.06315302 +46530.318065 +5808.09211039 +2564.75927526 +60035.54542301 +3436.21347154 +18745.15387726 +115812.34147973 +42888.900989 +36952.05049704 +7066.84560318 +9595.67674851 +35257.02279751 +-32886.60020068 +45989.55035151 +68573.39259734 +12450.88706732 +68077.30556375 +41198.14603142 +51566.88090835 +10116.70865137 +19601.29006617 +21604.855067 +22146.65392566 +63513.01793023 +27235.69072171 +-1401.78157288 +22462.41939849 +33488.61452602 +24706.00403167 +28997.76020474 +44546.69853829 +18691.84960063 +46976.26264746 +38048.33818933 +96742.89012745 +18675.17536519 +35603.33586369 +95529.39179445 +-20618.62908202 +30248.22265636 +58177.36971223 +74816.82151425 +80589.4672927 +19181.5069981 +19967.6179337 +13969.24485479 +22069.55792811 +21431.5904665 +-16124.54800494 +22547.06084191 +36012.07811975 +63788.51323823 +30348.11608767 +70016.83681477 +33212.85570119 +22024.09231216 +60059.6978516 +2487.53402614 +5759.81478054 +32842.32849592 +15695.99190143 +-4632.25409461 +82281.0881269 +10193.30750534 +40784.38244301 +6485.96375901 +-20567.29877089 +-14976.74617558 +23162.59876177 +-9417.98768497 +27397.00569631 +93851.10369304 +42168.01211962 +27551.45619454 +3920.13962222 +68077.01510415 +4963.02355624 +67946.54799363 +12919.95154779 +30176.99135399 +29131.72065519 +19683.7413456 +26939.23718358 +61285.00810936 +91721.85710117 +21726.30000557 +70521.3418985 +97836.13488989 +21713.01318128 +75926.14416738 +34608.89786801 +1465.63842859 +-2327.71741397 +91526.41281207 +53694.71739436 +39300.2654492 +26580.18398907 +31358.73071078 +-21296.21074361 +11914.02326663 +12571.57864198 +27320.36950373 +8028.93444472 +-32412.0827753 +37191.48787286 +29093.14589795 +76976.62681618 +10513.05562081 +31962.31807576 +74596.06873281 +37165.28483932 +25349.75202039 +55751.26645003 +-24537.78492307 +3863.12111331 +12752.59006227 +64802.23374294 +33001.59482781 +7004.87234196 +40835.96120586 +-4449.59597836 +68077.59602334 +-23560.51877084 +35923.13090476 +48183.02209537 +-5927.16247814 +68632.58888037 +56336.20692753 +-433.14706665 +45375.37864732 +27972.85054229 +7265.49169131 +28229.04205284 +67351.59227466 +78356.70441369 +-5811.18386794 +57786.45624177 +7474.38461372 +-13893.87944483 +36798.18905536 +26950.02008545 +15054.48436638 +5355.99704242 +61213.92093158 +36135.28104134 +12761.86619607 +67371.6227576 +114903.88176556 +81305.64055482 +46262.5521408 +41827.26389428 +43131.8069169 +31577.5911078 +124730.64167074 +16834.57302825 +11592.75701006 +42478.82532288 +51826.04067155 +-38297.91079565 +42698.64266845 +36476.03236631 +-14076.84652182 +53195.11943263 +9006.78965349 +652.05510634 +26053.82187321 +8770.86989327 +15444.87472768 +81223.0104155 +83650.540995 +24072.50110681 +12484.85121726 +68243.00153177 +66784.70962808 +30019.03525384 +150434.58086443 +2506.69397948 +71931.59302237 +58689.02680075 +46796.96583263 +87242.23560309 \ No newline at end of file