質問編集履歴
3
コード編集
test
CHANGED
File without changes
|
test
CHANGED
@@ -180,13 +180,13 @@
|
|
180
180
|
|
181
181
|
autoscaled_x_train_pre = (x_train - x_train.mean(axis=0)) / x_train.std(axis=0, ddof=1)
|
182
182
|
|
183
|
-
autoscaled_x_train =np.
|
183
|
+
autoscaled_x_train =np.concatenate([autoscaled_x_train_pre, x2_train],axis=1)
|
184
184
|
|
185
185
|
autoscaled_y_train = (y_train - y_train.mean()) / y_train.std(ddof=1)
|
186
186
|
|
187
187
|
autoscaled_x_test_pre = (x_test - x_train.mean(axis=0)) / x_train.std(axis=0, ddof=1)
|
188
188
|
|
189
|
-
autoscaled_x_train =np.a
|
189
|
+
autoscaled_x_train =np.concatenate([[autoscaled_x_test_pre], [x2_test]], axis=1)
|
190
190
|
|
191
191
|
else:
|
192
192
|
|
@@ -272,9 +272,9 @@
|
|
272
272
|
|
273
273
|
エラー:
|
274
274
|
|
275
|
-
|
275
|
+
ValueError Traceback (most recent call last)
|
276
|
-
|
276
|
+
|
277
|
-
<ipython-input-
|
277
|
+
<ipython-input-40-de7659de5d58> in <module>
|
278
278
|
|
279
279
|
99 # DCV
|
280
280
|
|
@@ -288,23 +288,21 @@
|
|
288
288
|
|
289
289
|
|
290
290
|
|
291
|
-
<ipython-input-
|
291
|
+
<ipython-input-40-de7659de5d58> in double_cross_validation(gs_cv, x, x2, y, outer_fold_number, do_autoscaling, random_state)
|
292
|
-
|
293
|
-
63 if do_autoscaling:
|
294
|
-
|
295
|
-
64 autoscaled_x_train_pre = (x_train - x_train.mean(axis=0)) / x_train.std(axis=0, ddof=1)
|
296
|
-
|
297
|
-
---> 65 autoscaled_x_train =np.insert(autoscaled_x_train_pre, x2_train)
|
298
292
|
|
299
293
|
66 autoscaled_y_train = (y_train - y_train.mean()) / y_train.std(ddof=1)
|
300
294
|
|
301
295
|
67 autoscaled_x_test_pre = (x_test - x_train.mean(axis=0)) / x_train.std(axis=0, ddof=1)
|
302
296
|
|
303
|
-
|
297
|
+
---> 68 autoscaled_x_train =np.concatenate([[autoscaled_x_test_pre], [x2_test]], axis=1)
|
298
|
+
|
304
|
-
|
299
|
+
69 else:
|
300
|
+
|
301
|
+
70 autoscaled_x_train = x_train.copy()
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
-
|
305
|
+
ValueError: all the input array dimensions except for the concatenation axis must match exactly
|
306
|
-
|
307
|
-
|
308
306
|
|
309
307
|
よろしくお願いします。
|
310
308
|
|
2
写真の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -311,3 +311,5 @@
|
|
311
311
|
|
312
312
|
|
313
313
|
![![イメージ説明](67b6071399bcd616340be0b24c608851.jpeg)](76b8eeb2cfb84fe71c8d4025542ffe90.jpeg)
|
314
|
+
|
315
|
+
![イメージ説明](dac26fe0337e7c15f4fa79976cb16f35.jpeg)
|
1
写真の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -307,3 +307,7 @@
|
|
307
307
|
|
308
308
|
|
309
309
|
よろしくお願いします。
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
![![イメージ説明](67b6071399bcd616340be0b24c608851.jpeg)](76b8eeb2cfb84fe71c8d4025542ffe90.jpeg)
|