質問編集履歴

2

修正しました

2019/11/20 06:36

投稿

python_2019
python_2019

スコア68

test CHANGED
File without changes
test CHANGED
@@ -122,6 +122,98 @@
122
122
 
123
123
  ```ここに言語を入力
124
124
 
125
+ print(x_train)
126
+
127
+ ```
128
+
129
+ NO1 NO2 NO3 NO4 NO5 NO6 NO7 NO8 NO9 NO10 ... NO775 NO776 \
130
+
131
+ 462 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0
132
+
133
+ 985 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0
134
+
135
+ 540 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0
136
+
137
+ 397 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0
138
+
139
+ 921 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0
140
+
141
+ 886 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0
142
+
143
+ 915 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0
144
+
145
+ 544 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0
146
+
147
+ .. ... ... ... ... ... ... ... ... ... ... ... ... ...
148
+
149
+ 591 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0
150
+
151
+ 496 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0
152
+
153
+ 896 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0
154
+
155
+ 476 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0
156
+
157
+ 884 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0
158
+
159
+ 144 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0
160
+
161
+
162
+
163
+ NO777 NO778 NO779 NO780 NO781 NO782 NO783 NO784
164
+
165
+ 462 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
166
+
167
+ 985 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
168
+
169
+ 540 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
170
+
171
+ 397 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
172
+
173
+ 93 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
174
+
175
+ 962 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
176
+
177
+ 400 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
178
+
179
+ 14 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
180
+
181
+ 749 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
182
+
183
+ 530 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
184
+
185
+ 544 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
186
+
187
+ .. ... ... ... ... ... ... ... ...
188
+
189
+
190
+
191
+ 916 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
192
+
193
+ 207 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
194
+
195
+ 588 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
196
+
197
+ 591 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
198
+
199
+ 496 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
200
+
201
+ 896 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
202
+
203
+ 476 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
204
+
205
+ 884 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
206
+
207
+ 144 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
208
+
209
+
210
+
211
+ [800 rows x 784 columns]
212
+
213
+
214
+
215
+ ```ここに言語を入力
216
+
125
217
  import numpy as np
126
218
 
127
219
  y_test_befor = np.array(y_test_befor).ravel()

1

コード修正

2019/11/20 06:36

投稿

python_2019
python_2019

スコア68

test CHANGED
File without changes
test CHANGED
@@ -122,6 +122,56 @@
122
122
 
123
123
  ```ここに言語を入力
124
124
 
125
+ import numpy as np
126
+
127
+ y_test_befor = np.array(y_test_befor).ravel()
128
+
129
+ ```
130
+
131
+ ```ここに言語を入力
132
+
133
+ # 配列を確認
134
+
135
+
136
+
137
+ print(y_test_befor)
138
+
139
+ print(y_test)
140
+
141
+ ```
142
+
143
+ ```ここに言語を入力
144
+
145
+ [1 3 6 6 3 3 9 2 8 1 1 6 3 4 9 8 5 1 0 7 0 5 4 1 2 6 1 0 2 3 2 1 1 4 8 6 5
146
+
147
+ 9 5 4 2 6 8 8 7 5 7 2 5 9 4 7 6 0 7 3 4 7 4 0 5 3 6 0 0 1 1 4 1 6 2 9 3 0
148
+
149
+ 3 2 6 1 4 7 1 6 9 7 8 3 3 0 6 9 0 3 2 4 3 5 1 4 1 2 9 9 2 7 1 1 7 3 2 7 3
150
+
151
+ 8 9 9 0 7 8 8 9 4 9 9 8 1 0 1 8 2 0 9 3 7 3 4 3 8 1 9 5 0 4 5 1 0 1 6 7 8
152
+
153
+ 2 1 2 0 4 0 3 5 2 7 1 7 9 6 2 1 6 0 5 3 7 4 8 2 7 4 3 2 8 2 3 5 5 6 7 7 9
154
+
155
+ 1 6 4 5 6 1 9 5 5 9 4 3 7 9 1]
156
+
157
+ [[0. 1. 0. ... 0. 0. 0.]
158
+
159
+ [0. 0. 0. ... 0. 0. 0.]
160
+
161
+ [0. 0. 0. ... 0. 0. 0.]
162
+
163
+ ...
164
+
165
+ [0. 0. 0. ... 1. 0. 0.]
166
+
167
+ [0. 0. 0. ... 0. 0. 1.]
168
+
169
+ [0. 1. 0. ... 0. 0. 0.]]
170
+
171
+ ```
172
+
173
+ ```ここに言語を入力
174
+
125
175
  import pandas as pd
126
176
 
127
177
  import numpy as np
@@ -180,6 +230,26 @@
180
230
 
181
231
  ```ここに言語を入力
182
232
 
233
+ import numpy as np
234
+
235
+ y_test_befor = np.array(y_test_befor).ravel()
236
+
237
+ ```
238
+
239
+ ```ここに言語を入力
240
+
241
+ # 配列を確認
242
+
243
+
244
+
245
+ print(y_test_befor)
246
+
247
+ print(y_test)
248
+
249
+ ```
250
+
251
+ ```ここに言語を入力
252
+
183
253
  ---------------------------------------------------------------------------
184
254
 
185
255
  AttributeError Traceback (most recent call last)