TAU20 pytorch linear regression

This commit is contained in:
ksanu 2019-11-19 22:50:08 +01:00
commit b62a6b4641
13 changed files with 7719 additions and 0 deletions

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="projectConfiguration" value="pytest" />
<option name="PROJECT_TEST_RUNNER" value="pytest" />
</component>
</module>

4
.idea/misc.xml Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/TAU_20_mieszkania3.iml" filepath="$PROJECT_DIR$/.idea/TAU_20_mieszkania3.iml" />
</modules>
</component>
</project>

190
.idea/workspace.xml Normal file
View File

@ -0,0 +1,190 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="b2470b4d-798c-4f2c-b219-8e78ac955f76" name="Default Changelist" comment="" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileEditorManager">
<leaf>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/config.txt">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/my_solution.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="6" selection-start-line="6" selection-end-line="6" />
<folding>
<element signature="e#0#13#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Python Script" />
</list>
</option>
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/main.py" />
<option value="$PROJECT_DIR$/my_solution.py" />
</list>
</option>
</component>
<component name="ProjectFrameBounds" extendedState="1">
<option name="x" value="80" />
<option name="y" value="5" />
<option name="width" value="1810" />
<option name="height" value="1000" />
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="TAU_20_mieszkania3" type="b2602c69:ProjectViewProjectNode" />
<item name="TAU_20_mieszkania3" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="TAU_20_mieszkania3" type="b2602c69:ProjectViewProjectNode" />
<item name="TAU_20_mieszkania3" type="462c0819:PsiDirectoryNode" />
<item name="dev-0" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="TAU_20_mieszkania3" type="b2602c69:ProjectViewProjectNode" />
<item name="TAU_20_mieszkania3" type="462c0819:PsiDirectoryNode" />
<item name="test-A" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="settings.editor.selected.configurable" value="preferences.general" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager">
<configuration name="my_solution" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="TAU_20_mieszkania3" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/my_solution.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="Python.my_solution" />
</list>
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="b2470b4d-798c-4f2c-b219-8e78ac955f76" name="Default Changelist" comment="" />
<created>1574197973857</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1574197973857</updated>
</task>
<servers />
</component>
<component name="ToolWindowManager">
<frame x="64" y="4" width="1448" height="800" extended-state="0" />
<editor active="true" />
<layout>
<window_info id="Favorites" side_tool="true" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.25" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Version Control" />
<window_info anchor="bottom" id="Python Console" />
<window_info anchor="bottom" id="Terminal" />
<window_info anchor="bottom" id="Event Log" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.32884902" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
</layout>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/gonito.yaml">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/config.txt">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/main.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="119">
<caret line="67" selection-start-line="67" selection-end-line="68" selection-end-column="119" />
<folding>
<element signature="e#0#11#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/my_solution.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="6" selection-start-line="6" selection-end-line="6" />
<folding>
<element signature="e#0#13#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component>
</project>

19
README.md Normal file
View File

@ -0,0 +1,19 @@
Mieszkania3 Challenge
======================
Guess the prices of flats in Poznan. Edition 2018
Directory structure
-------------------
* `README.md` — this file
* `config.txt` — configuration file
* `train/` — directory with training data
* `train/train.tsv` — sample train set
* `dev-0/` — directory with dev (test) data
* `dev-0/in.tsv` — input data for the dev set
* `dev-0/expected.tsv` — expected (reference) data for the dev set
* `test-A` — directory with test data
* `test-A/in.tsv` — input data for the test set
* `test-A/expected.tsv` — expected (reference) data for the test set

1
config.txt Normal file
View File

@ -0,0 +1 @@
--metric RMSE

500
dev-0/expected.tsv Normal file
View File

@ -0,0 +1,500 @@
232408
779000
411901
1160000
266448
559000
749000
359000
1349000
368568
378000
351475
333905
574371
729000
282994
330000
254727
330060
329000
0
274344
353379
278000
450000
310584
840000
249048
224663
286000
699000
432000
290000
777459
290195
283024
417000
579000
260876
640000
750000
269000
318645
362880
488000
302887
285534
369083
452208
383950
520000
405000
470000
439863
2350000
399000
256088
217686
204450
972000
280000
269000
320000
460000
635000
329000
422000
218000
334610
310584
274380
372211
335000
485000
295000
590000
399000
417700
480000
368712
318452
520000
398000
215000
1300000
292354
360000
346622
372444
289000
235000
353438
0
409240
659000
277098
566000
799000
980000
442002
336474
459000
299000
150000
462000
330000
255000
238000
244071
339000
369000
204450
334240
359000
268098
499000
630000
250000
492000
451567
349000
345000
195000
278000
665000
349332
350464
497400
1366410
529000
315000
368712
699000
342220
198660
269000
325000
369000
699000
790000
0
310000
1366410
370000
400000
316357
499000
350784
249900
397350
599000
378000
510186
237405
474912
234000
1050000
1850000
2400000
337524
595000
290387
255000
216000
149000
295000
182000
135000
408430
299500
650000
420000
249000
274000
420000
406000
720000
339000
503965
599000
355000
579000
313000
285534
2200000
0
1590000
337792
345865
699000
1500000
267984
241304
249000
458000
307156
340000
599000
357695
250000
419000
650000
1800000
885000
305000
317944
0
349000
292307
365000
330000
307026
320189
230000
320000
332556
185232
228000
440000
270449
325000
960000
321650
214109
529000
468000
310576
530000
240000
799000
368359
375000
281000
249000
270000
369598
215556
269000
529000
382000
319875
229000
332691
307035
0
368712
6100
300541
249000
643000
329000
371432
1850000
308237
290195
330368
596000
290195
296424
264000
470991
367000
328241
0
365000
470093
259000
259701
0
455348
439000
333592
268385
214200
248400
499000
1190000
949000
319875
389196
399000
429000
266448
256872
266064
1699000
368568
349000
238000
302887
465000
316995
335000
340500
289000
492000
339000
452658
950000
598000
359000
286698
519000
198000
404965
1420000
319900
380000
1106525
280056
279000
381398
188000
320000
1366410
388000
262656
415000
599000
276000
277425
220210
246636
425000
1299000
527940
535000
315810
350000
490000
159900
470093
1366410
649000
237000
815000
645
730000
520000
1366410
579000
389610
424430
245000
350000
720000
313536
489000
0
232632
337524
245000
217686
240000
229000
250000
270000
300428
411901
237405
620000
299000
298285
277000
286384
442980
239000
399850
295000
250000
438354
1
462000
699000
198000
249048
590000
284618
264000
344152
219000
376986
233386
369000
380000
214171
295020
405000
799000
1290000
315000
330000
217686
439900
254576
467000
535000
525000
253288
330000
179000
250000
372204
250745
262136
650000
370000
372049
550000
1350000
488004
195000
356160
368110
215000
302887
335000
425000
629000
890000
299133
296928
710000
3350000
299000
939000
354416
220210
250000
349000
375484
399000
262136
492000
411926
1199000
325000
777459
445000
296000
260876
450000
560000
599000
354000
330393
310584
410000
980000
340000
430000
250000
380000
328241
209000
218000
330060
393120
290387
349000
249000
351475
599000
279000
233386
580000
2300000
210000
367495
291592
380091
320768
486720
375000
299000
404965
359000
335343
228200
319900
320311
307156
1390000
236016
343000
399000
330500
385500
335000
328241
620000
290000
299000
580000
237405
260610
329000
217686
740000
430000
1 232408
2 779000
3 411901
4 1160000
5 266448
6 559000
7 749000
8 359000
9 1349000
10 368568
11 378000
12 351475
13 333905
14 574371
15 729000
16 282994
17 330000
18 254727
19 330060
20 329000
21 0
22 274344
23 353379
24 278000
25 450000
26 310584
27 840000
28 249048
29 224663
30 286000
31 699000
32 432000
33 290000
34 777459
35 290195
36 283024
37 417000
38 579000
39 260876
40 640000
41 750000
42 269000
43 318645
44 362880
45 488000
46 302887
47 285534
48 369083
49 452208
50 383950
51 520000
52 405000
53 470000
54 439863
55 2350000
56 399000
57 256088
58 217686
59 204450
60 972000
61 280000
62 269000
63 320000
64 460000
65 635000
66 329000
67 422000
68 218000
69 334610
70 310584
71 274380
72 372211
73 335000
74 485000
75 295000
76 590000
77 399000
78 417700
79 480000
80 368712
81 318452
82 520000
83 398000
84 215000
85 1300000
86 292354
87 360000
88 346622
89 372444
90 289000
91 235000
92 353438
93 0
94 409240
95 659000
96 277098
97 566000
98 799000
99 980000
100 442002
101 336474
102 459000
103 299000
104 150000
105 462000
106 330000
107 255000
108 238000
109 244071
110 339000
111 369000
112 204450
113 334240
114 359000
115 268098
116 499000
117 630000
118 250000
119 492000
120 451567
121 349000
122 345000
123 195000
124 278000
125 665000
126 349332
127 350464
128 497400
129 1366410
130 529000
131 315000
132 368712
133 699000
134 342220
135 198660
136 269000
137 325000
138 369000
139 699000
140 790000
141 0
142 310000
143 1366410
144 370000
145 400000
146 316357
147 499000
148 350784
149 249900
150 397350
151 599000
152 378000
153 510186
154 237405
155 474912
156 234000
157 1050000
158 1850000
159 2400000
160 337524
161 595000
162 290387
163 255000
164 216000
165 149000
166 295000
167 182000
168 135000
169 408430
170 299500
171 650000
172 420000
173 249000
174 274000
175 420000
176 406000
177 720000
178 339000
179 503965
180 599000
181 355000
182 579000
183 313000
184 285534
185 2200000
186 0
187 1590000
188 337792
189 345865
190 699000
191 1500000
192 267984
193 241304
194 249000
195 458000
196 307156
197 340000
198 599000
199 357695
200 250000
201 419000
202 650000
203 1800000
204 885000
205 305000
206 317944
207 0
208 349000
209 292307
210 365000
211 330000
212 307026
213 320189
214 230000
215 320000
216 332556
217 185232
218 228000
219 440000
220 270449
221 325000
222 960000
223 321650
224 214109
225 529000
226 468000
227 310576
228 530000
229 240000
230 799000
231 368359
232 375000
233 281000
234 249000
235 270000
236 369598
237 215556
238 269000
239 529000
240 382000
241 319875
242 229000
243 332691
244 307035
245 0
246 368712
247 6100
248 300541
249 249000
250 643000
251 329000
252 371432
253 1850000
254 308237
255 290195
256 330368
257 596000
258 290195
259 296424
260 264000
261 470991
262 367000
263 328241
264 0
265 365000
266 470093
267 259000
268 259701
269 0
270 455348
271 439000
272 333592
273 268385
274 214200
275 248400
276 499000
277 1190000
278 949000
279 319875
280 389196
281 399000
282 429000
283 266448
284 256872
285 266064
286 1699000
287 368568
288 349000
289 238000
290 302887
291 465000
292 316995
293 335000
294 340500
295 289000
296 492000
297 339000
298 452658
299 950000
300 598000
301 359000
302 286698
303 519000
304 198000
305 404965
306 1420000
307 319900
308 380000
309 1106525
310 280056
311 279000
312 381398
313 188000
314 320000
315 1366410
316 388000
317 262656
318 415000
319 599000
320 276000
321 277425
322 220210
323 246636
324 425000
325 1299000
326 527940
327 535000
328 315810
329 350000
330 490000
331 159900
332 470093
333 1366410
334 649000
335 237000
336 815000
337 645
338 730000
339 520000
340 1366410
341 579000
342 389610
343 424430
344 245000
345 350000
346 720000
347 313536
348 489000
349 0
350 232632
351 337524
352 245000
353 217686
354 240000
355 229000
356 250000
357 270000
358 300428
359 411901
360 237405
361 620000
362 299000
363 298285
364 277000
365 286384
366 442980
367 239000
368 399850
369 295000
370 250000
371 438354
372 1
373 462000
374 699000
375 198000
376 249048
377 590000
378 284618
379 264000
380 344152
381 219000
382 376986
383 233386
384 369000
385 380000
386 214171
387 295020
388 405000
389 799000
390 1290000
391 315000
392 330000
393 217686
394 439900
395 254576
396 467000
397 535000
398 525000
399 253288
400 330000
401 179000
402 250000
403 372204
404 250745
405 262136
406 650000
407 370000
408 372049
409 550000
410 1350000
411 488004
412 195000
413 356160
414 368110
415 215000
416 302887
417 335000
418 425000
419 629000
420 890000
421 299133
422 296928
423 710000
424 3350000
425 299000
426 939000
427 354416
428 220210
429 250000
430 349000
431 375484
432 399000
433 262136
434 492000
435 411926
436 1199000
437 325000
438 777459
439 445000
440 296000
441 260876
442 450000
443 560000
444 599000
445 354000
446 330393
447 310584
448 410000
449 980000
450 340000
451 430000
452 250000
453 380000
454 328241
455 209000
456 218000
457 330060
458 393120
459 290387
460 349000
461 249000
462 351475
463 599000
464 279000
465 233386
466 580000
467 2300000
468 210000
469 367495
470 291592
471 380091
472 320768
473 486720
474 375000
475 299000
476 404965
477 359000
478 335343
479 228200
480 319900
481 320311
482 307156
483 1390000
484 236016
485 343000
486 399000
487 330500
488 385500
489 335000
490 328241
491 620000
492 290000
493 299000
494 580000
495 237405
496 260610
497 329000
498 217686
499 740000
500 430000

500
dev-0/in.tsv Normal file

File diff suppressed because one or more lines are too long

500
dev-0/out.tsv Normal file
View File

@ -0,0 +1,500 @@
79372
256107
94760
145169
86122
226625
266618
146739
325571
112225
78421
105214
100772
117729
409482
82245
77421
78778
106271
85437
104768
84790
128015
99636
103260
85883
308589
59247
69631
76114
259745
99730
127819
231776
82416
91092
107431
142215
89433
320682
76565
68857
86769
92096
111140
89785
72565
130502
137535
94403
144879
86920
111975
138494
535002
91915
84433
61107
80860
235797
81950
111172
86593
389623
320286
97510
107431
65284
93071
85883
83015
130502
95211
123922
136888
177818
139396
105214
97645
99906
93957
144874
123823
78778
281097
111172
83929
82774
82416
98305
65284
84105
55804
105239
207118
82245
199812
297099
344693
97424
102099
97932
94408
48617
97600
96601
79758
57763
86769
88433
157315
76114
112804
127233
81266
221769
200816
88904
97932
146485
123823
89654
73647
77446
238435
98461
102099
147034
204085
109033
80618
99906
332349
77917
57582
74606
96601
82774
138510
286054
110095
100596
204085
85432
122238
93957
109738
78582
89334
77446
324715
109562
120103
67081
145951
52788
318018
201635
473234
98104
126876
51457
58624
53944
54009
103161
73999
65460
125073
83642
183855
100661
92900
91273
74783
99378
268421
91744
111070
233113
90745
318665
83994
72565
436119
66792
694000
108357
97129
221479
1142654
70963
71077
73275
86769
79576
69279
117729
103431
78491
107431
214135
671006
250779
110291
93957
104768
99559
73451
156893
86658
99768
102275
76623
105276
70787
66792
58448
82064
73451
101144
250246
78778
55452
167520
158198
96130
378812
60779
156508
129171
77094
58292
62444
91273
77917
46928
87630
288398
85437
118806
83654
83106
94113
65460
99906
145174
73451
73275
124790
90407
129171
517832
84552
82416
115168
364670
82416
73451
112680
140609
79581
103607
62464
154652
97424
81950
76404
55804
90588
273886
101457
82769
56432
62111
108230
318993
478889
118806
114267
139396
89257
87097
84433
73917
462579
112225
68927
49244
89785
134289
101928
105276
85883
98305
118595
119242
139277
208626
116819
155984
72119
201501
52436
116045
209844
114971
82839
209160
87454
88609
94916
42585
105276
201169
122942
64775
84904
132203
70611
69279
70430
75581
159862
421607
122766
94584
95530
139552
207295
73607
97424
204085
216975
75938
231091
321908
153041
259745
204085
150025
110775
138494
89334
98378
211823
77446
182588
104768
73275
98104
154812
61107
75938
83654
59271
90470
78577
94760
60603
313018
81154
64599
69906
88786
105038
57940
132888
63952
82323
104239
150047
237751
329604
51280
59247
139723
70611
86658
102485
79934
82416
73093
136732
103260
69098
74606
83282
279273
406642
118967
96601
61107
127129
87273
127806
112406
147543
84433
72922
72667
83654
81085
89433
85765
217773
93428
129171
145780
432397
120103
175801
113615
101218
146719
89785
85261
150284
191136
284760
62734
73451
273748
520143
56960
403835
93227
70430
61230
68770
127839
130229
85765
118595
135830
403684
101752
231776
105571
76643
89433
138572
206144
141055
155984
120495
85883
106472
402646
79576
109320
82323
107255
99969
63952
68770
106271
92096
51457
97932
71943
105214
90588
62620
73093
167873
399588
57763
90765
92424
95445
102432
110095
97756
78426
116045
87391
116246
71296
114971
104939
79576
494224
59448
95735
94232
84105
92174
105276
99969
109390
72119
115344
111407
63443
68123
92605
55452
95896
99911
1 79372
2 256107
3 94760
4 145169
5 86122
6 226625
7 266618
8 146739
9 325571
10 112225
11 78421
12 105214
13 100772
14 117729
15 409482
16 82245
17 77421
18 78778
19 106271
20 85437
21 104768
22 84790
23 128015
24 99636
25 103260
26 85883
27 308589
28 59247
29 69631
30 76114
31 259745
32 99730
33 127819
34 231776
35 82416
36 91092
37 107431
38 142215
39 89433
40 320682
41 76565
42 68857
43 86769
44 92096
45 111140
46 89785
47 72565
48 130502
49 137535
50 94403
51 144879
52 86920
53 111975
54 138494
55 535002
56 91915
57 84433
58 61107
59 80860
60 235797
61 81950
62 111172
63 86593
64 389623
65 320286
66 97510
67 107431
68 65284
69 93071
70 85883
71 83015
72 130502
73 95211
74 123922
75 136888
76 177818
77 139396
78 105214
79 97645
80 99906
81 93957
82 144874
83 123823
84 78778
85 281097
86 111172
87 83929
88 82774
89 82416
90 98305
91 65284
92 84105
93 55804
94 105239
95 207118
96 82245
97 199812
98 297099
99 344693
100 97424
101 102099
102 97932
103 94408
104 48617
105 97600
106 96601
107 79758
108 57763
109 86769
110 88433
111 157315
112 76114
113 112804
114 127233
115 81266
116 221769
117 200816
118 88904
119 97932
120 146485
121 123823
122 89654
123 73647
124 77446
125 238435
126 98461
127 102099
128 147034
129 204085
130 109033
131 80618
132 99906
133 332349
134 77917
135 57582
136 74606
137 96601
138 82774
139 138510
140 286054
141 110095
142 100596
143 204085
144 85432
145 122238
146 93957
147 109738
148 78582
149 89334
150 77446
151 324715
152 109562
153 120103
154 67081
155 145951
156 52788
157 318018
158 201635
159 473234
160 98104
161 126876
162 51457
163 58624
164 53944
165 54009
166 103161
167 73999
168 65460
169 125073
170 83642
171 183855
172 100661
173 92900
174 91273
175 74783
176 99378
177 268421
178 91744
179 111070
180 233113
181 90745
182 318665
183 83994
184 72565
185 436119
186 66792
187 694000
188 108357
189 97129
190 221479
191 1142654
192 70963
193 71077
194 73275
195 86769
196 79576
197 69279
198 117729
199 103431
200 78491
201 107431
202 214135
203 671006
204 250779
205 110291
206 93957
207 104768
208 99559
209 73451
210 156893
211 86658
212 99768
213 102275
214 76623
215 105276
216 70787
217 66792
218 58448
219 82064
220 73451
221 101144
222 250246
223 78778
224 55452
225 167520
226 158198
227 96130
228 378812
229 60779
230 156508
231 129171
232 77094
233 58292
234 62444
235 91273
236 77917
237 46928
238 87630
239 288398
240 85437
241 118806
242 83654
243 83106
244 94113
245 65460
246 99906
247 145174
248 73451
249 73275
250 124790
251 90407
252 129171
253 517832
254 84552
255 82416
256 115168
257 364670
258 82416
259 73451
260 112680
261 140609
262 79581
263 103607
264 62464
265 154652
266 97424
267 81950
268 76404
269 55804
270 90588
271 273886
272 101457
273 82769
274 56432
275 62111
276 108230
277 318993
278 478889
279 118806
280 114267
281 139396
282 89257
283 87097
284 84433
285 73917
286 462579
287 112225
288 68927
289 49244
290 89785
291 134289
292 101928
293 105276
294 85883
295 98305
296 118595
297 119242
298 139277
299 208626
300 116819
301 155984
302 72119
303 201501
304 52436
305 116045
306 209844
307 114971
308 82839
309 209160
310 87454
311 88609
312 94916
313 42585
314 105276
315 201169
316 122942
317 64775
318 84904
319 132203
320 70611
321 69279
322 70430
323 75581
324 159862
325 421607
326 122766
327 94584
328 95530
329 139552
330 207295
331 73607
332 97424
333 204085
334 216975
335 75938
336 231091
337 321908
338 153041
339 259745
340 204085
341 150025
342 110775
343 138494
344 89334
345 98378
346 211823
347 77446
348 182588
349 104768
350 73275
351 98104
352 154812
353 61107
354 75938
355 83654
356 59271
357 90470
358 78577
359 94760
360 60603
361 313018
362 81154
363 64599
364 69906
365 88786
366 105038
367 57940
368 132888
369 63952
370 82323
371 104239
372 150047
373 237751
374 329604
375 51280
376 59247
377 139723
378 70611
379 86658
380 102485
381 79934
382 82416
383 73093
384 136732
385 103260
386 69098
387 74606
388 83282
389 279273
390 406642
391 118967
392 96601
393 61107
394 127129
395 87273
396 127806
397 112406
398 147543
399 84433
400 72922
401 72667
402 83654
403 81085
404 89433
405 85765
406 217773
407 93428
408 129171
409 145780
410 432397
411 120103
412 175801
413 113615
414 101218
415 146719
416 89785
417 85261
418 150284
419 191136
420 284760
421 62734
422 73451
423 273748
424 520143
425 56960
426 403835
427 93227
428 70430
429 61230
430 68770
431 127839
432 130229
433 85765
434 118595
435 135830
436 403684
437 101752
438 231776
439 105571
440 76643
441 89433
442 138572
443 206144
444 141055
445 155984
446 120495
447 85883
448 106472
449 402646
450 79576
451 109320
452 82323
453 107255
454 99969
455 63952
456 68770
457 106271
458 92096
459 51457
460 97932
461 71943
462 105214
463 90588
464 62620
465 73093
466 167873
467 399588
468 57763
469 90765
470 92424
471 95445
472 102432
473 110095
474 97756
475 78426
476 116045
477 87391
478 116246
479 71296
480 114971
481 104939
482 79576
483 494224
484 59448
485 95735
486 94232
487 84105
488 92174
489 105276
490 99969
491 109390
492 72119
493 115344
494 111407
495 63443
496 68123
497 92605
498 55452
499 95896
500 99911

72
my_solution.py Normal file
View File

@ -0,0 +1,72 @@
import pandas
from sklearn.preprocessing import LabelEncoder
import torch
import numpy as np
def encoder(data):
for col in data.columns:
if data.dtypes[col] == "object":
data[col].fillna('0', inplace=True)
le = LabelEncoder()
le.fit(data[col])
data[col] = le.transform(data[col])
else:
data[col].fillna(0, inplace=True)
return data
X_train = pandas.read_csv('train/train.tsv', error_bad_lines=False, sep='\t', header=0)
names = list(X_train)[1:]
X_train.drop('opis', axis=1, inplace=True)
y_train = X_train['cena']
X_train.drop('cena', axis=1, inplace=True)
X_train = encoder(X_train)
X_dev0 = pandas.read_csv('dev-0/in.tsv', sep='\t', header=None, names=names)
X_dev0.drop('opis', axis=1, inplace=True)
X_dev0 = encoder(X_dev0)
y_dev0 = pandas.read_csv('dev-0/expected.tsv', sep='\t', header=None)
X_testA = pandas.read_csv('test-A/in.tsv', sep='\t', header=None, names=names)
X_testA.drop('opis', axis=1, inplace=True)
X_testA = encoder(X_testA)
data_train = X_train[['Powierzchnia w m2', 'Liczba pokoi', 'Miejsce parkingowe', 'Liczba pięter w budynku']].values
data_train = np.hstack((data_train, np.ones((data_train.shape[0], 1), dtype=data_train.dtype)))
x = torch.tensor(data_train , dtype=torch.float)
y = torch.tensor(y_train, dtype=torch.float)
w = torch.tensor([0, 0, 0, 0, 0], dtype=torch.float, requires_grad=True)
learning_rate = torch.tensor(0.00000001)
for _ in range(100000):
y_predicted = x @ w
cost = torch.sum((y_predicted - y) ** 2) / y.size()[0]
#print(_, w, " => ", cost)
cost.backward()
with torch.no_grad():
w = w - learning_rate * w.grad
w.requires_grad_(True)
w.requires_grad_(False)
data_dev = X_dev0[['Powierzchnia w m2', 'Liczba pokoi', 'Miejsce parkingowe', 'Liczba pięter w budynku']].values
data_dev = np.hstack((data_dev, np.ones((data_dev.shape[0], 1), dtype=data_dev.dtype)))
x_dev = torch.tensor(data_dev, dtype=torch.float)
data_testA = X_testA[['Powierzchnia w m2', 'Liczba pokoi', 'Miejsce parkingowe', 'Liczba pięter w budynku']].values
data_testA = np.hstack((data_testA, np.ones((data_testA.shape[0], 1), dtype=data_testA.dtype)))
x_test = torch.tensor(data_testA , dtype=torch.float)
y_dev_pred = x_dev @ w
np.savetxt(f'./dev-0/out.tsv', y_dev_pred.numpy(), '%.0f')
y_test_pred = x_test @ w
np.savetxt(f'./test-A/out.tsv', y_test_pred.numpy(), '%.0f')

487
test-A/in.tsv Normal file

File diff suppressed because one or more lines are too long

487
test-A/out.tsv Normal file
View File

@ -0,0 +1,487 @@
229470
104727
124163
80618
87519
97194
87220
104304
122942
66792
78667
66615
130502
151812
90555
134695
101928
89334
104592
102816
78778
42585
157315
75827
137240
79934
104304
77581
56849
117896
103084
124704
602701
91674
75938
65911
76918
115996
88786
66615
104304
77094
160488
99478
51457
55276
84105
163877
323015
58337
201604
158198
54009
120103
79581
308798
149403
105009
102837
121180
101928
88433
120103
130502
89568
112942
92096
84974
157315
46580
87454
137240
90588
309307
95740
147169
79483
141477
59604
156598
95445
58337
109865
110447
90183
129171
639928
99636
68751
99969
111583
150735
285621
84974
89785
714752
80110
100596
76114
81950
1106248
129491
131834
82839
83282
90183
145526
83577
226806
123843
110160
69259
84855
105845
66680
98989
72119
202324
128953
58337
123746
81950
93232
103853
88629
128015
80618
104083
103501
694025
152029
76426
103084
90183
255754
109320
89237
120495
100772
55276
174532
86990
93493
78778
102907
73451
69455
90588
97489
48617
84614
98997
107313
317788
152132
129602
133617
84909
98793
141222
77446
177965
82597
113738
134498
120495
103697
83654
164599
101576
77250
515918
109840
90765
116676
148940
77446
55452
97129
108165
139396
71943
85162
86769
154652
145153
145042
104805
84438
167520
105734
75516
97932
81266
51522
408177
92514
155886
139552
81528
414436
2014034
93937
92429
78778
97194
76602
83994
83642
107313
154046
79999
58337
83654
105361
81266
232198
160488
70787
70611
123139
80618
97109
102485
88609
78778
137240
73516
51457
59448
70983
98997
90765
89785
66615
61464
98793
106100
91645
184363
84974
82597
56784
73275
123139
97489
248652
57763
96735
117328
86187
218130
130876
81774
92161
117896
154652
137403
90765
81950
104592
109234
102104
83994
84974
69279
152132
146387
83225
258123
88101
66172
86187
87454
89785
128015
265494
59624
81089
202833
58583
94760
57763
71943
80110
73275
221479
100772
73902
53944
70852
71655
86122
116246
73516
101928
145042
284760
69520
93076
602701
121434
160488
129171
105571
406642
89334
66172
106165
93937
79287
106608
57652
77094
97489
103260
174532
261750
68905
318665
121208
686328
76623
109976
117896
255636
126572
88982
74848
84105
117896
65107
125802
91273
78778
238969
93563
140453
44797
55452
200816
94113
70435
60197
54629
171340
195489
59513
69520
77779
112680
118007
424706
84974
134379
98989
99969
98461
57116
85524
124507
82597
101190
110406
81266
214819
101190
188210
95740
90588
105517
84790
105361
299410
61648
297099
76114
71943
79265
70259
100309
98420
54120
105140
98948
83106
66615
125155
81950
56432
101928
100772
142215
93957
127876
112406
139904
127839
94584
135974
111316
631761
101190
225512
58337
109234
130502
108411
105361
106472
78667
79999
88982
66172
111251
96666
85437
107764
90588
98948
85326
58337
108763
70611
80618
90412
162369
84105
88786
53944
101477
129171
105517
124163
100190
77446
143821
163877
77270
133245
86494
123139
80110
117896
90588
121208
322587
95817
64599
65460
105812
92605
90588
81950
104415
112759
90588
97932
73516
129023
109234
60197
143821
88982
129171
57940
218130
109840
77667
146550
98997
71274
105734
82245
83929
155886
92781
70611
102698
109984
69520
99597
253148
92231
75155
222876
77335
1 229470
2 104727
3 124163
4 80618
5 87519
6 97194
7 87220
8 104304
9 122942
10 66792
11 78667
12 66615
13 130502
14 151812
15 90555
16 134695
17 101928
18 89334
19 104592
20 102816
21 78778
22 42585
23 157315
24 75827
25 137240
26 79934
27 104304
28 77581
29 56849
30 117896
31 103084
32 124704
33 602701
34 91674
35 75938
36 65911
37 76918
38 115996
39 88786
40 66615
41 104304
42 77094
43 160488
44 99478
45 51457
46 55276
47 84105
48 163877
49 323015
50 58337
51 201604
52 158198
53 54009
54 120103
55 79581
56 308798
57 149403
58 105009
59 102837
60 121180
61 101928
62 88433
63 120103
64 130502
65 89568
66 112942
67 92096
68 84974
69 157315
70 46580
71 87454
72 137240
73 90588
74 309307
75 95740
76 147169
77 79483
78 141477
79 59604
80 156598
81 95445
82 58337
83 109865
84 110447
85 90183
86 129171
87 639928
88 99636
89 68751
90 99969
91 111583
92 150735
93 285621
94 84974
95 89785
96 714752
97 80110
98 100596
99 76114
100 81950
101 1106248
102 129491
103 131834
104 82839
105 83282
106 90183
107 145526
108 83577
109 226806
110 123843
111 110160
112 69259
113 84855
114 105845
115 66680
116 98989
117 72119
118 202324
119 128953
120 58337
121 123746
122 81950
123 93232
124 103853
125 88629
126 128015
127 80618
128 104083
129 103501
130 694025
131 152029
132 76426
133 103084
134 90183
135 255754
136 109320
137 89237
138 120495
139 100772
140 55276
141 174532
142 86990
143 93493
144 78778
145 102907
146 73451
147 69455
148 90588
149 97489
150 48617
151 84614
152 98997
153 107313
154 317788
155 152132
156 129602
157 133617
158 84909
159 98793
160 141222
161 77446
162 177965
163 82597
164 113738
165 134498
166 120495
167 103697
168 83654
169 164599
170 101576
171 77250
172 515918
173 109840
174 90765
175 116676
176 148940
177 77446
178 55452
179 97129
180 108165
181 139396
182 71943
183 85162
184 86769
185 154652
186 145153
187 145042
188 104805
189 84438
190 167520
191 105734
192 75516
193 97932
194 81266
195 51522
196 408177
197 92514
198 155886
199 139552
200 81528
201 414436
202 2014034
203 93937
204 92429
205 78778
206 97194
207 76602
208 83994
209 83642
210 107313
211 154046
212 79999
213 58337
214 83654
215 105361
216 81266
217 232198
218 160488
219 70787
220 70611
221 123139
222 80618
223 97109
224 102485
225 88609
226 78778
227 137240
228 73516
229 51457
230 59448
231 70983
232 98997
233 90765
234 89785
235 66615
236 61464
237 98793
238 106100
239 91645
240 184363
241 84974
242 82597
243 56784
244 73275
245 123139
246 97489
247 248652
248 57763
249 96735
250 117328
251 86187
252 218130
253 130876
254 81774
255 92161
256 117896
257 154652
258 137403
259 90765
260 81950
261 104592
262 109234
263 102104
264 83994
265 84974
266 69279
267 152132
268 146387
269 83225
270 258123
271 88101
272 66172
273 86187
274 87454
275 89785
276 128015
277 265494
278 59624
279 81089
280 202833
281 58583
282 94760
283 57763
284 71943
285 80110
286 73275
287 221479
288 100772
289 73902
290 53944
291 70852
292 71655
293 86122
294 116246
295 73516
296 101928
297 145042
298 284760
299 69520
300 93076
301 602701
302 121434
303 160488
304 129171
305 105571
306 406642
307 89334
308 66172
309 106165
310 93937
311 79287
312 106608
313 57652
314 77094
315 97489
316 103260
317 174532
318 261750
319 68905
320 318665
321 121208
322 686328
323 76623
324 109976
325 117896
326 255636
327 126572
328 88982
329 74848
330 84105
331 117896
332 65107
333 125802
334 91273
335 78778
336 238969
337 93563
338 140453
339 44797
340 55452
341 200816
342 94113
343 70435
344 60197
345 54629
346 171340
347 195489
348 59513
349 69520
350 77779
351 112680
352 118007
353 424706
354 84974
355 134379
356 98989
357 99969
358 98461
359 57116
360 85524
361 124507
362 82597
363 101190
364 110406
365 81266
366 214819
367 101190
368 188210
369 95740
370 90588
371 105517
372 84790
373 105361
374 299410
375 61648
376 297099
377 76114
378 71943
379 79265
380 70259
381 100309
382 98420
383 54120
384 105140
385 98948
386 83106
387 66615
388 125155
389 81950
390 56432
391 101928
392 100772
393 142215
394 93957
395 127876
396 112406
397 139904
398 127839
399 94584
400 135974
401 111316
402 631761
403 101190
404 225512
405 58337
406 109234
407 130502
408 108411
409 105361
410 106472
411 78667
412 79999
413 88982
414 66172
415 111251
416 96666
417 85437
418 107764
419 90588
420 98948
421 85326
422 58337
423 108763
424 70611
425 80618
426 90412
427 162369
428 84105
429 88786
430 53944
431 101477
432 129171
433 105517
434 124163
435 100190
436 77446
437 143821
438 163877
439 77270
440 133245
441 86494
442 123139
443 80110
444 117896
445 90588
446 121208
447 322587
448 95817
449 64599
450 65460
451 105812
452 92605
453 90588
454 81950
455 104415
456 112759
457 90588
458 97932
459 73516
460 129023
461 109234
462 60197
463 143821
464 88982
465 129171
466 57940
467 218130
468 109840
469 77667
470 146550
471 98997
472 71274
473 105734
474 82245
475 83929
476 155886
477 92781
478 70611
479 102698
480 109984
481 69520
482 99597
483 253148
484 92231
485 75155
486 222876
487 77335

4939
train/train.tsv Normal file

File diff suppressed because one or more lines are too long