TAU20 pytorch linear regression

This commit is contained in:
ksanu 2019-11-19 23:01:29 +01:00
parent b62a6b4641
commit a65241a464
5 changed files with 1020 additions and 999 deletions

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -1,7 +1,13 @@
<?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="" />
<list default="true" id="b2470b4d-798c-4f2c-b219-8e78ac955f76" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/dev-0/out.tsv" beforeDir="false" afterPath="$PROJECT_DIR$/dev-0/out.tsv" afterDir="false" />
<change beforePath="$PROJECT_DIR$/my_solution.py" beforeDir="false" afterPath="$PROJECT_DIR$/my_solution.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/test-A/out.tsv" beforeDir="false" afterPath="$PROJECT_DIR$/test-A/out.tsv" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -18,8 +24,8 @@
<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" />
<state relative-caret-position="143">
<caret line="42" column="25" selection-start-line="42" selection-start-column="25" selection-end-line="42" selection-end-column="25" />
<folding>
<element signature="e#0#13#0" expanded="true" />
</folding>
@ -36,6 +42,9 @@
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
@ -44,12 +53,13 @@
</list>
</option>
</component>
<component name="ProjectFrameBounds" extendedState="1">
<component name="ProjectFrameBounds">
<option name="x" value="80" />
<option name="y" value="5" />
<option name="width" value="1810" />
<option name="height" value="1000" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
@ -80,6 +90,7 @@
</panes>
</component>
<component name="PropertiesComponent">
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="settings.editor.selected.configurable" value="preferences.general" />
</component>
@ -124,7 +135,7 @@
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration />
<configuration>C:\Users\jpleb\AppData\Roaming\Subversion</configuration>
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
@ -141,7 +152,7 @@
<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 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" />
@ -149,7 +160,7 @@
<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 active="true" 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" />
@ -159,6 +170,10 @@
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
</layout>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="TAU20 pytorch linear regression" />
<option name="LAST_COMMIT_MESSAGE" value="TAU20 pytorch linear regression" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/gonito.yaml">
<provider selected="true" editor-type-id="text-editor" />
@ -178,8 +193,8 @@
</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" />
<state relative-caret-position="143">
<caret line="42" column="25" selection-start-line="42" selection-start-column="25" selection-end-line="42" selection-end-column="25" />
<folding>
<element signature="e#0#13#0" expanded="true" />
</folding>

File diff suppressed because it is too large Load Diff

View File

@ -34,13 +34,13 @@ 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 = X_train[['Powierzchnia w m2', 'Liczba pokoi']].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)
w = torch.tensor([0, 0, 0], dtype=torch.float, requires_grad=True)
learning_rate = torch.tensor(0.00000001)
for _ in range(100000):
@ -55,13 +55,13 @@ w.requires_grad_(False)
data_dev = X_dev0[['Powierzchnia w m2', 'Liczba pokoi', 'Miejsce parkingowe', 'Liczba pięter w budynku']].values
data_dev = X_dev0[['Powierzchnia w m2', 'Liczba pokoi']].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 = X_testA[['Powierzchnia w m2', 'Liczba pokoi']].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)

View File

@ -1,487 +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
228194
99139
109340
70617
71976
76050
88938
97781
107982
53625
65849
56342
89632
111362
57700
134451
92348
56342
95064
87580
65849
43424
114079
65849
128354
69923
97781
68565
40708
73998
96422
119511
603107
78072
65849
67207
72640
103907
76050
56342
97781
69923
120205
86945
37992
44783
71282
155517
317892
50909
196986
155517
40708
107982
75356
306303
137861
86915
92348
80124
92348
81483
107982
89632
80789
106594
79431
78072
114079
47499
74692
128354
80789
309714
88938
106624
54984
126996
54984
145316
82841
50909
88967
92348
74692
88273
643852
72640
67207
78766
107982
139219
282550
78072
71282
714476
67207
90990
63133
71976
1116493
114773
90990
67207
73334
74692
142600
79431
225478
82841
95064
70617
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
64491
53625
71976
59058
197621
97781
50909
117489
71976
95064
82841
67207
84199
70617
91654
88273
696126
140548
64491
96422
74692
260790
101855
90990
79431
88273
44783
166383
80124
78072
65849
99139
60416
56342
80789
82147
37992
74692
80789
86251
309684
137861
114773
107288
80789
86251
97781
64491
155517
72640
107288
93706
79431
73998
56342
156241
97781
78766
517513
68565
78072
72640
143294
64491
42066
78766
97781
127660
61774
54984
73998
111362
104571
104571
92378
77408
165025
64491
64491
88273
71282
35275
404756
71282
147368
136503
70617
414957
2050911
84199
85557
65849
76050
61774
71282
76714
86251
142600
67207
50909
56342
81483
71282
228194
120205
57700
60416
93706
70617
90326
97781
78766
65849
128354
57700
37992
46141
43424
80789
78072
71282
56342
48193
86251
93706
64491
179300
78072
72640
43424
63133
93706
82147
247873
50215
90990
105265
70617
216635
127660
74692
76714
73998
111362
90990
78072
71976
95064
99803
89632
71282
78072
59058
137861
140578
84863
257409
75356
50215
70617
74692
71282
84199
262148
43424
73998
201031
54984
82147
50215
61774
67207
63133
220045
88273
75356
43424
54984
64491
73334
101161
57700
92348
104571
284573
53625
86221
603107
109340
120205
88273
101855
408860
56342
50215
90990
84199
69259
97116
50215
69923
82147
93706
166383
255417
59722
319162
93706
694074
66543
88967
73998
251977
82841
61774
59058
71282
73998
57700
96422
81483
65849
234985
84863
111362
31201
42066
198979
81483
63133
44118
44118
171815
193546
43424
53625
70617
68565
73998
424493
78072
123586
71976
78766
80124
49551
74692
78766
72640
80124
99139
71282
213254
80124
183345
88938
80789
90326
71976
81483
299513
54290
291364
63133
61774
64491
65849
93706
86915
40708
75356
78766
76050
56342
95758
71976
48857
92348
88273
139219
72640
125638
105930
131070
86915
84863
124280
99139
638419
80124
224149
50909
99803
89632
101855
81483
76714
65849
67207
61774
50215
101855
84199
72640
101191
80789
78766
72640
50909
96422
60416
70617
83505
156876
71282
76050
43424
77408
88273
90326
109340
84893
64491
103213
155517
67207
124280
56342
93706
67207
73998
80789
93706
323266
65849
54290
52267
96422
82841
80789
71976
97781
100497
80789
88273
57700
104571
99803
44118
103213
61774
88273
47499
216635
68565
70617
103213
80789
56342
64491
78072
73998
147368
80124
60416
78766
97781
53625
95758
246544
83505
44783
218687
64491

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