回答編集履歴
1
edit
test
CHANGED
@@ -1 +1,25 @@
|
|
1
1
|
ラベル別に与えれば、正しくないものはすぐにわかるのではないでしょうか?
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
```python
|
6
|
+
|
7
|
+
X, y = get_input_output() #input, output
|
8
|
+
|
9
|
+
model = get_model() #model
|
10
|
+
|
11
|
+
model.fit(X, y)
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
py = model.predict(X[y==0])
|
16
|
+
|
17
|
+
np.where(py==1) #wrong prediction: should be 0
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
py = model.predict(X[y==1])
|
22
|
+
|
23
|
+
np.where(py==0) #wrong prediction: should be 1
|
24
|
+
|
25
|
+
```
|