This commit is contained in:
Cezary Ptaszek 2020-12-16 09:46:51 +01:00
commit 91744ddc0a
16 changed files with 4478 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*~
*.pyc

3
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

View File

@ -0,0 +1,12 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyPep8NamingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="ignoredErrors">
<list>
<option value="N802" />
</list>
</option>
</inspection_tool>
</profile>
</component>

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

8
.idea/mieszkania5.iml Normal file
View File

@ -0,0 +1,8 @@
<?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>
</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/mieszkania5.iml" filepath="$PROJECT_DIR$/.idea/mieszkania5.iml" />
</modules>
</component>
</project>

6
README.md Normal file
View File

@ -0,0 +1,6 @@
Mieszkania5 challenge
=====================
Guess the price of a flat/house.
The metric is absolute mean error.

1
config.txt Normal file
View File

@ -0,0 +1 @@
--metric MAE --precision 1

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

@ -0,0 +1,462 @@
373000
299000
365000
369000
483791
430000
312000
397000
302672
325000
302800
300495
375038
437131
373761
337567
359320
326407
294819
266000
355720.5
288000
239000
385000
349000
804500
520000
315441
339000
429000
325000
269000
420000
400000
420000
385000
617232
399000
328338
596232
339000
293000
289000
330000
499000
419000
219598
341670
351259
319000
211426
309000
299000
349000
508000
270000
333750
724120
485000
274000
242775
415125
269000
535000
497000
357124
830000
675000
399000
550000
245000
219598
365000
435000
254231
359000
485000
469758
382740
499000
279000
283080
298200
339000
239900
341145
310000
369000
327000
259000
1308456
434358
449000
293000
203000
273000
175000
368938
299000
415000
333000
345000
350000
297987
290696.04
293571
459000
355000
269000
345000
300000
1156756
242943.1
486600
305370
318240
340000
316000
300500
335000
227000
399000
1100000
389000
370000
659000
249000
555000
315205
349000
385000
397005
469000
490000
316900
254500
280000
294588
275000
369000
857514
560000
310000
596232
459000
238000
440000
499000
327104
650000
235000
338200
412000
329000
609631
309000
250000
469000
311122
450000
299000
499000
330400
295000
315500
254500
467700
393750
530000
270000
297987
360400
337567
380000
568600
322010
490824
269548
361745
359371
579900
340000
199000
255000
255000
245000
303204
290000
349000
360000
350000
469064
280000
417000
318032
579000
320000
382060
379000
420000
250000
211500
254280
383000
355696
249000
359000
429000
605000
325949
340000
420000
579215
304900
380000
229000
325000
675000
409000
355000
388447.5
345015
199000
320292
300841
313000
566999
275000
359371
253000
262000
230000
299000
399000
453040
479000
312000
1100000
308196
355000
336842
248100
352894
242000
330000
315000
299900
454000
325000
499900
369000
429000
244500
661650
357475
321165
330000
404900
1240000
696000
295000
295000
417000
242300
285000
980000
229000
259786
447496.2
239617.2
260000
387000
799000
238638
354944
521683
506600
506363
299000
844990
213000
324900
261000
349000
480000
283000
430000
259786
339000
299000
530000
396683
329000
420863
299000
276458
350286
515000
341670
369000
322000
761976.07
389000
459999
429000
425000
286000
270000
561636.5
550625
324836
221976
699000
579000
514000
282000
345000
534508
299000
545000
250000
379000
269000
299000
329000
249976
430000
303086
303000
238400
339000
241500
1100000
399000
530000
972000
359000
250000
329460
239000
490110
468120
378157
285000
235850
499000
235850
365428
670000
320000
279000
388000
324990
570000
348796
287144
272000
267877
255062
650000
364000
530000
570000
284000
339000
435000
280000
1300000
365428
295000
360000
205000
319000
736450
453040
280500
299000
330000
337110
520000
395000
595000
375000
358575
588000
1025455
245000
238500
1167400
249000
441000
239000
455000
640000
344250
400000
485000
543617
276000
428400
360315
595000
595000
535000
534600
330000
627810
439000
304945
699000
712164
250000
449000
284859
595350
259000
590000
355000
389000
429000
649000
297987
159761
505505
336676
272764
343876
336290.5
308035
335226.5
532317
525937.5
397720
702150
592020
671488
593000
399000
1800000
288728
393211
789325
453040
345015
519745
400920
2318580
469728
247154
328828.5
260927.5
482729
257328.5
305923.5
529623
641395.58
669606.91
655544.02
471397.97
309958
699000
850000
1 373000
2 299000
3 365000
4 369000
5 483791
6 430000
7 312000
8 397000
9 302672
10 325000
11 302800
12 300495
13 375038
14 437131
15 373761
16 337567
17 359320
18 326407
19 294819
20 266000
21 355720.5
22 288000
23 239000
24 385000
25 349000
26 804500
27 520000
28 315441
29 339000
30 429000
31 325000
32 269000
33 420000
34 400000
35 420000
36 385000
37 617232
38 399000
39 328338
40 596232
41 339000
42 293000
43 289000
44 330000
45 499000
46 419000
47 219598
48 341670
49 351259
50 319000
51 211426
52 309000
53 299000
54 349000
55 508000
56 270000
57 333750
58 724120
59 485000
60 274000
61 242775
62 415125
63 269000
64 535000
65 497000
66 357124
67 830000
68 675000
69 399000
70 550000
71 245000
72 219598
73 365000
74 435000
75 254231
76 359000
77 485000
78 469758
79 382740
80 499000
81 279000
82 283080
83 298200
84 339000
85 239900
86 341145
87 310000
88 369000
89 327000
90 259000
91 1308456
92 434358
93 449000
94 293000
95 203000
96 273000
97 175000
98 368938
99 299000
100 415000
101 333000
102 345000
103 350000
104 297987
105 290696.04
106 293571
107 459000
108 355000
109 269000
110 345000
111 300000
112 1156756
113 242943.1
114 486600
115 305370
116 318240
117 340000
118 316000
119 300500
120 335000
121 227000
122 399000
123 1100000
124 389000
125 370000
126 659000
127 249000
128 555000
129 315205
130 349000
131 385000
132 397005
133 469000
134 490000
135 316900
136 254500
137 280000
138 294588
139 275000
140 369000
141 857514
142 560000
143 310000
144 596232
145 459000
146 238000
147 440000
148 499000
149 327104
150 650000
151 235000
152 338200
153 412000
154 329000
155 609631
156 309000
157 250000
158 469000
159 311122
160 450000
161 299000
162 499000
163 330400
164 295000
165 315500
166 254500
167 467700
168 393750
169 530000
170 270000
171 297987
172 360400
173 337567
174 380000
175 568600
176 322010
177 490824
178 269548
179 361745
180 359371
181 579900
182 340000
183 199000
184 255000
185 255000
186 245000
187 303204
188 290000
189 349000
190 360000
191 350000
192 469064
193 280000
194 417000
195 318032
196 579000
197 320000
198 382060
199 379000
200 420000
201 250000
202 211500
203 254280
204 383000
205 355696
206 249000
207 359000
208 429000
209 605000
210 325949
211 340000
212 420000
213 579215
214 304900
215 380000
216 229000
217 325000
218 675000
219 409000
220 355000
221 388447.5
222 345015
223 199000
224 320292
225 300841
226 313000
227 566999
228 275000
229 359371
230 253000
231 262000
232 230000
233 299000
234 399000
235 453040
236 479000
237 312000
238 1100000
239 308196
240 355000
241 336842
242 248100
243 352894
244 242000
245 330000
246 315000
247 299900
248 454000
249 325000
250 499900
251 369000
252 429000
253 244500
254 661650
255 357475
256 321165
257 330000
258 404900
259 1240000
260 696000
261 295000
262 295000
263 417000
264 242300
265 285000
266 980000
267 229000
268 259786
269 447496.2
270 239617.2
271 260000
272 387000
273 799000
274 238638
275 354944
276 521683
277 506600
278 506363
279 299000
280 844990
281 213000
282 324900
283 261000
284 349000
285 480000
286 283000
287 430000
288 259786
289 339000
290 299000
291 530000
292 396683
293 329000
294 420863
295 299000
296 276458
297 350286
298 515000
299 341670
300 369000
301 322000
302 761976.07
303 389000
304 459999
305 429000
306 425000
307 286000
308 270000
309 561636.5
310 550625
311 324836
312 221976
313 699000
314 579000
315 514000
316 282000
317 345000
318 534508
319 299000
320 545000
321 250000
322 379000
323 269000
324 299000
325 329000
326 249976
327 430000
328 303086
329 303000
330 238400
331 339000
332 241500
333 1100000
334 399000
335 530000
336 972000
337 359000
338 250000
339 329460
340 239000
341 490110
342 468120
343 378157
344 285000
345 235850
346 499000
347 235850
348 365428
349 670000
350 320000
351 279000
352 388000
353 324990
354 570000
355 348796
356 287144
357 272000
358 267877
359 255062
360 650000
361 364000
362 530000
363 570000
364 284000
365 339000
366 435000
367 280000
368 1300000
369 365428
370 295000
371 360000
372 205000
373 319000
374 736450
375 453040
376 280500
377 299000
378 330000
379 337110
380 520000
381 395000
382 595000
383 375000
384 358575
385 588000
386 1025455
387 245000
388 238500
389 1167400
390 249000
391 441000
392 239000
393 455000
394 640000
395 344250
396 400000
397 485000
398 543617
399 276000
400 428400
401 360315
402 595000
403 595000
404 535000
405 534600
406 330000
407 627810
408 439000
409 304945
410 699000
411 712164
412 250000
413 449000
414 284859
415 595350
416 259000
417 590000
418 355000
419 389000
420 429000
421 649000
422 297987
423 159761
424 505505
425 336676
426 272764
427 343876
428 336290.5
429 308035
430 335226.5
431 532317
432 525937.5
433 397720
434 702150
435 592020
436 671488
437 593000
438 399000
439 1800000
440 288728
441 393211
442 789325
443 453040
444 345015
445 519745
446 400920
447 2318580
448 469728
449 247154
450 328828.5
451 260927.5
452 482729
453 257328.5
454 305923.5
455 529623
456 641395.58
457 669606.91
458 655544.02
459 471397.97
460 309958
461 699000
462 850000

462
dev-0/in.tsv Normal file

File diff suppressed because one or more lines are too long

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

@ -0,0 +1,462 @@
166158.140625
265841.875
431981.40625
238594.984375
199386.046875
637994.4375
332297.6875
299069.78125
232680.40625
244576.0
132930.234375
289433.6875
199386.046875
199386.046875
422013.03125
199386.046875
132930.234375
132930.234375
132930.234375
132930.234375
199386.046875
264512.75
232680.40625
463547.90625
199386.046875
332297.6875
285778.59375
232680.40625
232680.40625
232680.40625
232613.953125
301728.0
352234.4375
332297.6875
372835.71875
179449.296875
132930.234375
465209.3125
332297.6875
232680.40625
265841.875
199386.046875
112993.4765625
239259.53125
531665.125
332297.6875
199386.046875
199386.046875
285911.53125
299069.78125
465209.3125
186094.875
285778.59375
279133.03125
133594.78125
166158.140625
295746.96875
265841.875
332297.6875
119639.0546875
215136.078125
232680.40625
265841.875
332297.6875
66474.40625
372171.15625
299069.78125
372171.15625
345588.84375
199386.046875
232680.40625
232680.40625
232680.40625
132930.234375
286376.71875
412044.65625
199386.046875
465209.3125
232680.40625
352234.4375
352234.4375
232680.40625
232680.40625
365525.59375
132930.234375
232680.40625
305715.34375
199386.046875
232680.40625
252550.703125
332297.6875
265841.875
485146.0625
265841.875
199120.21875
598120.9375
83088.359375
132930.234375
319006.53125
132930.234375
199386.046875
232680.40625
199386.046875
398753.5
212677.203125
212677.203125
365525.59375
232680.40625
330304.0
315683.71875
311031.8125
232680.40625
132930.234375
385462.34375
166158.140625
166158.140625
332297.6875
531665.125
232680.40625
325652.09375
99037.75
329639.4375
93721.2890625
232680.40625
418690.25
547082.875
225968.375
232613.953125
166158.140625
564893.0
279133.03125
232680.40625
66474.40625
183436.65625
332297.6875
152866.96875
221981.015625
66474.40625
199386.046875
320335.625
649956.4375
511728.375
232680.40625
232680.40625
232613.953125
259860.84375
377487.625
199386.046875
199386.046875
279133.03125
146221.390625
232680.40625
265841.875
292424.1875
232680.40625
265841.875
531665.125
398753.5
134192.890625
159512.5625
322395.75
325652.09375
232680.40625
305715.34375
232680.40625
232680.40625
558247.4375
232680.40625
348911.625
76442.7734375
262984.25
232680.40625
134192.890625
372171.15625
232680.40625
232680.40625
232680.40625
182772.09375
232680.40625
232680.40625
232680.40625
232680.40625
172803.71875
232680.40625
132930.234375
232680.40625
531665.125
199386.046875
365525.59375
299069.78125
272487.4375
66474.40625
292424.1875
470525.78125
132930.234375
465209.3125
370842.0625
232680.40625
232680.40625
531665.125
292424.1875
312360.9375
232680.40625
134059.984375
232680.40625
312360.9375
199386.046875
166158.140625
305715.34375
132930.234375
345588.84375
398088.9375
81054.8125
132930.234375
304386.25
438627.0
305715.34375
448595.375
199386.046875
132930.234375
134192.890625
132930.234375
232680.40625
232680.40625
232680.40625
232613.953125
232680.40625
305715.34375
232680.40625
498437.21875
232613.953125
106347.890625
531665.125
279133.03125
199386.046875
199386.046875
232680.40625
451918.15625
132930.234375
285778.59375
132930.234375
232680.40625
132930.234375
206031.625
199386.046875
398753.5
265841.875
232680.40625
132930.234375
299069.78125
279133.03125
134059.984375
232680.40625
199386.046875
132930.234375
199386.046875
305715.34375
232680.40625
133461.875
199386.046875
285778.59375
252550.703125
501095.46875
232680.40625
324322.96875
232680.40625
207693.015625
232680.40625
107145.3671875
232680.40625
132930.234375
132930.234375
372171.15625
66474.40625
265841.875
172803.71875
232680.40625
232680.40625
232680.40625
232680.40625
129122.3046875
232680.40625
66474.40625
199386.046875
438627.0
332297.6875
259196.28125
232680.40625
398753.5
259196.28125
365525.59375
232680.40625
132930.234375
212677.203125
132930.234375
232680.40625
232680.40625
319006.53125
232680.40625
225968.375
172803.71875
99702.3125
232680.40625
232680.40625
265841.875
378816.75
232680.40625
93056.7265625
99702.3125
99702.3125
232680.40625
186094.875
565557.5625
232680.40625
132930.234375
232680.40625
299069.78125
232680.40625
166158.140625
232680.40625
265841.875
232680.40625
199386.046875
132930.234375
146221.390625
232680.40625
132930.234375
232680.40625
232680.40625
232680.40625
312360.9375
232680.40625
199386.046875
418690.25
398753.5
107730.171875
199386.046875
232680.40625
356221.78125
106347.890625
199386.046875
199386.046875
232680.40625
192740.46875
232680.40625
325652.09375
232680.40625
239259.53125
66474.40625
232680.40625
232680.40625
265841.875
232680.40625
232680.40625
232680.40625
232680.40625
158848.0
159512.5625
132930.234375
232680.40625
199386.046875
398753.5
465209.3125
232680.40625
232680.40625
352234.4375
232680.40625
494815.375
232680.40625
318940.0625
285778.59375
232680.40625
132930.234375
232680.40625
232680.40625
232680.40625
245905.125
279133.03125
232680.40625
232680.40625
285778.59375
531665.125
232680.40625
199386.046875
465209.3125
332297.6875
245905.125
232680.40625
265841.875
253879.8125
132930.234375
132930.234375
465209.3125
332297.6875
232680.40625
232680.40625
225968.375
99702.3125
186094.875
232680.40625
354759.75
515051.1875
252550.703125
523690.4375
232680.40625
232680.40625
232680.40625
378816.75
132930.234375
132930.234375
232680.40625
202775.296875
232680.40625
71790.8671875
565225.3125
498437.21875
232680.40625
332297.6875
232680.40625
232680.40625
232680.40625
232680.40625
232680.40625
232680.40625
232680.40625
232680.40625
232680.40625
232680.40625
232680.40625
232680.40625
232680.40625
232680.40625
66474.40625
66474.40625
66474.40625
438627.0
498437.21875
232680.40625
232680.40625
232680.40625
332297.6875
199386.046875
199386.046875
132930.234375
132930.234375
199386.046875
232680.40625
232680.40625
132930.234375
232680.40625
232680.40625
332297.6875
232680.40625
232680.40625
99702.3125
99702.3125
99702.3125
99702.3125
99702.3125
232680.40625
73256.21875
232680.40625
1 166158.140625
2 265841.875
3 431981.40625
4 238594.984375
5 199386.046875
6 637994.4375
7 332297.6875
8 299069.78125
9 232680.40625
10 244576.0
11 132930.234375
12 289433.6875
13 199386.046875
14 199386.046875
15 422013.03125
16 199386.046875
17 132930.234375
18 132930.234375
19 132930.234375
20 132930.234375
21 199386.046875
22 264512.75
23 232680.40625
24 463547.90625
25 199386.046875
26 332297.6875
27 285778.59375
28 232680.40625
29 232680.40625
30 232680.40625
31 232613.953125
32 301728.0
33 352234.4375
34 332297.6875
35 372835.71875
36 179449.296875
37 132930.234375
38 465209.3125
39 332297.6875
40 232680.40625
41 265841.875
42 199386.046875
43 112993.4765625
44 239259.53125
45 531665.125
46 332297.6875
47 199386.046875
48 199386.046875
49 285911.53125
50 299069.78125
51 465209.3125
52 186094.875
53 285778.59375
54 279133.03125
55 133594.78125
56 166158.140625
57 295746.96875
58 265841.875
59 332297.6875
60 119639.0546875
61 215136.078125
62 232680.40625
63 265841.875
64 332297.6875
65 66474.40625
66 372171.15625
67 299069.78125
68 372171.15625
69 345588.84375
70 199386.046875
71 232680.40625
72 232680.40625
73 232680.40625
74 132930.234375
75 286376.71875
76 412044.65625
77 199386.046875
78 465209.3125
79 232680.40625
80 352234.4375
81 352234.4375
82 232680.40625
83 232680.40625
84 365525.59375
85 132930.234375
86 232680.40625
87 305715.34375
88 199386.046875
89 232680.40625
90 252550.703125
91 332297.6875
92 265841.875
93 485146.0625
94 265841.875
95 199120.21875
96 598120.9375
97 83088.359375
98 132930.234375
99 319006.53125
100 132930.234375
101 199386.046875
102 232680.40625
103 199386.046875
104 398753.5
105 212677.203125
106 212677.203125
107 365525.59375
108 232680.40625
109 330304.0
110 315683.71875
111 311031.8125
112 232680.40625
113 132930.234375
114 385462.34375
115 166158.140625
116 166158.140625
117 332297.6875
118 531665.125
119 232680.40625
120 325652.09375
121 99037.75
122 329639.4375
123 93721.2890625
124 232680.40625
125 418690.25
126 547082.875
127 225968.375
128 232613.953125
129 166158.140625
130 564893.0
131 279133.03125
132 232680.40625
133 66474.40625
134 183436.65625
135 332297.6875
136 152866.96875
137 221981.015625
138 66474.40625
139 199386.046875
140 320335.625
141 649956.4375
142 511728.375
143 232680.40625
144 232680.40625
145 232613.953125
146 259860.84375
147 377487.625
148 199386.046875
149 199386.046875
150 279133.03125
151 146221.390625
152 232680.40625
153 265841.875
154 292424.1875
155 232680.40625
156 265841.875
157 531665.125
158 398753.5
159 134192.890625
160 159512.5625
161 322395.75
162 325652.09375
163 232680.40625
164 305715.34375
165 232680.40625
166 232680.40625
167 558247.4375
168 232680.40625
169 348911.625
170 76442.7734375
171 262984.25
172 232680.40625
173 134192.890625
174 372171.15625
175 232680.40625
176 232680.40625
177 232680.40625
178 182772.09375
179 232680.40625
180 232680.40625
181 232680.40625
182 232680.40625
183 172803.71875
184 232680.40625
185 132930.234375
186 232680.40625
187 531665.125
188 199386.046875
189 365525.59375
190 299069.78125
191 272487.4375
192 66474.40625
193 292424.1875
194 470525.78125
195 132930.234375
196 465209.3125
197 370842.0625
198 232680.40625
199 232680.40625
200 531665.125
201 292424.1875
202 312360.9375
203 232680.40625
204 134059.984375
205 232680.40625
206 312360.9375
207 199386.046875
208 166158.140625
209 305715.34375
210 132930.234375
211 345588.84375
212 398088.9375
213 81054.8125
214 132930.234375
215 304386.25
216 438627.0
217 305715.34375
218 448595.375
219 199386.046875
220 132930.234375
221 134192.890625
222 132930.234375
223 232680.40625
224 232680.40625
225 232680.40625
226 232613.953125
227 232680.40625
228 305715.34375
229 232680.40625
230 498437.21875
231 232613.953125
232 106347.890625
233 531665.125
234 279133.03125
235 199386.046875
236 199386.046875
237 232680.40625
238 451918.15625
239 132930.234375
240 285778.59375
241 132930.234375
242 232680.40625
243 132930.234375
244 206031.625
245 199386.046875
246 398753.5
247 265841.875
248 232680.40625
249 132930.234375
250 299069.78125
251 279133.03125
252 134059.984375
253 232680.40625
254 199386.046875
255 132930.234375
256 199386.046875
257 305715.34375
258 232680.40625
259 133461.875
260 199386.046875
261 285778.59375
262 252550.703125
263 501095.46875
264 232680.40625
265 324322.96875
266 232680.40625
267 207693.015625
268 232680.40625
269 107145.3671875
270 232680.40625
271 132930.234375
272 132930.234375
273 372171.15625
274 66474.40625
275 265841.875
276 172803.71875
277 232680.40625
278 232680.40625
279 232680.40625
280 232680.40625
281 129122.3046875
282 232680.40625
283 66474.40625
284 199386.046875
285 438627.0
286 332297.6875
287 259196.28125
288 232680.40625
289 398753.5
290 259196.28125
291 365525.59375
292 232680.40625
293 132930.234375
294 212677.203125
295 132930.234375
296 232680.40625
297 232680.40625
298 319006.53125
299 232680.40625
300 225968.375
301 172803.71875
302 99702.3125
303 232680.40625
304 232680.40625
305 265841.875
306 378816.75
307 232680.40625
308 93056.7265625
309 99702.3125
310 99702.3125
311 232680.40625
312 186094.875
313 565557.5625
314 232680.40625
315 132930.234375
316 232680.40625
317 299069.78125
318 232680.40625
319 166158.140625
320 232680.40625
321 265841.875
322 232680.40625
323 199386.046875
324 132930.234375
325 146221.390625
326 232680.40625
327 132930.234375
328 232680.40625
329 232680.40625
330 232680.40625
331 312360.9375
332 232680.40625
333 199386.046875
334 418690.25
335 398753.5
336 107730.171875
337 199386.046875
338 232680.40625
339 356221.78125
340 106347.890625
341 199386.046875
342 199386.046875
343 232680.40625
344 192740.46875
345 232680.40625
346 325652.09375
347 232680.40625
348 239259.53125
349 66474.40625
350 232680.40625
351 232680.40625
352 265841.875
353 232680.40625
354 232680.40625
355 232680.40625
356 232680.40625
357 158848.0
358 159512.5625
359 132930.234375
360 232680.40625
361 199386.046875
362 398753.5
363 465209.3125
364 232680.40625
365 232680.40625
366 352234.4375
367 232680.40625
368 494815.375
369 232680.40625
370 318940.0625
371 285778.59375
372 232680.40625
373 132930.234375
374 232680.40625
375 232680.40625
376 232680.40625
377 245905.125
378 279133.03125
379 232680.40625
380 232680.40625
381 285778.59375
382 531665.125
383 232680.40625
384 199386.046875
385 465209.3125
386 332297.6875
387 245905.125
388 232680.40625
389 265841.875
390 253879.8125
391 132930.234375
392 132930.234375
393 465209.3125
394 332297.6875
395 232680.40625
396 232680.40625
397 225968.375
398 99702.3125
399 186094.875
400 232680.40625
401 354759.75
402 515051.1875
403 252550.703125
404 523690.4375
405 232680.40625
406 232680.40625
407 232680.40625
408 378816.75
409 132930.234375
410 132930.234375
411 232680.40625
412 202775.296875
413 232680.40625
414 71790.8671875
415 565225.3125
416 498437.21875
417 232680.40625
418 332297.6875
419 232680.40625
420 232680.40625
421 232680.40625
422 232680.40625
423 232680.40625
424 232680.40625
425 232680.40625
426 232680.40625
427 232680.40625
428 232680.40625
429 232680.40625
430 232680.40625
431 232680.40625
432 232680.40625
433 66474.40625
434 66474.40625
435 66474.40625
436 438627.0
437 498437.21875
438 232680.40625
439 232680.40625
440 232680.40625
441 332297.6875
442 199386.046875
443 199386.046875
444 132930.234375
445 132930.234375
446 199386.046875
447 232680.40625
448 232680.40625
449 132930.234375
450 232680.40625
451 232680.40625
452 332297.6875
453 232680.40625
454 232680.40625
455 99702.3125
456 99702.3125
457 99702.3125
458 99702.3125
459 99702.3125
460 232680.40625
461 73256.21875
462 232680.40625

77
mieszkania5.py Normal file
View File

@ -0,0 +1,77 @@
import torch
import torch.optim as op
from torch.autograd import Variable
from price_parser import Price
train = open('train/train.tsv', 'r')
test_in = open('test-A/in.tsv', 'r')
test_out = open('test-A/out.tsv', 'w+')
expected = []
prices = []
def count_loss(y_predicted, y_target):
return ((y_predicted - y_target) ** 2).sum()
def read_in_file_as_line():
with test_in as tin:
lines = tin.readlines()
return lines
def count(a, b, x):
return a * x + b
def optimization(a, b, x, y):
optimization = op.Adam([a, b], lr=0.02)
for t in range(1000):
optimization.zero_grad()
y_predicted = count(a, b, x)
current_loss = count_loss(y_predicted, y)
current_loss.backward()
optimization.step()
def create_prize_and_exp_tab():
for line in train.readlines():
price = Price.fromstring(line.split('\t', 1)[1])
if price.currency == "" and price.currency == "PLN":
a = line.split('\t', 1)[0]
float_price = price.amount_float
while int(float_price) < 100000:
float_price = float_price * 10
expected.append(float(a))
prices.append(float_price)
x = torch.tensor(prices, dtype=torch.float)
y = torch.tensor(expected, dtype=torch.float)
a = torch.randn(1, requires_grad=True)
b = torch.randn(1, requires_grad=True)
optimization(a, b, x, y)
with test_out as out:
for line in read_in_file_as_line():
i = 0
text = line.split('\t')
price = Price.fromstring(text[i])
while price.currency != "" and price.currency != "PLN" and i < len(text):
price = Price.fromstring(text[i])
i += 1
if (price.currency != "" and price.currency != "PLN") or price.amount is None or price.amount == 0:
price = Price.fromstring("350100")
float_price = price.amount_float
while int(float_price) < 100000:
float_price = float_price * 10
predict = Variable(torch.Tensor([float_price]))
predicted_price = count(a, b, predict).detach()
out.write(str(predicted_price.item()))
out.write('\n')
if __name__ == '__main__':
create_prize_and_exp_tab()

418
test-A/in.tsv Normal file

File diff suppressed because one or more lines are too long

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

2547
train/train.tsv Normal file

File diff suppressed because one or more lines are too long