質問編集履歴
3
```に変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
#出力内容(最後のほうにエラーがでています)
|
16
16
|
|
17
|
-
|
17
|
+
```
|
18
18
|
|
19
19
|
---------2の画像をnumpy形式に変換し、Listに格納中---------
|
20
20
|
|
@@ -94,13 +94,13 @@
|
|
94
94
|
|
95
95
|
ValueError: Classification metrics can't handle a mix of multiclass-multioutput and binary targets
|
96
96
|
|
97
|
-
|
97
|
+
```
|
98
98
|
|
99
99
|
|
100
100
|
|
101
101
|
#該当のソースコード(test.py)
|
102
102
|
|
103
|
-
|
103
|
+
```
|
104
104
|
|
105
105
|
from sklearn.model_selection import train_test_split
|
106
106
|
|
@@ -154,11 +154,11 @@
|
|
154
154
|
|
155
155
|
joblib.dump(mlp,"model.pkl",compress=True)#モデルの保存
|
156
156
|
|
157
|
-
|
157
|
+
```
|
158
158
|
|
159
159
|
#データセット作成コード(suuuji0420)
|
160
160
|
|
161
|
-
|
161
|
+
```
|
162
162
|
|
163
163
|
from PIL import Image
|
164
164
|
|
@@ -262,7 +262,7 @@
|
|
262
262
|
|
263
263
|
return suuji
|
264
264
|
|
265
|
-
|
265
|
+
```
|
266
266
|
|
267
267
|
#備考
|
268
268
|
|
2
コードの"""を'''になおしました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
#出力内容(最後のほうにエラーがでています)
|
16
16
|
|
17
|
-
|
17
|
+
'''
|
18
18
|
|
19
19
|
---------2の画像をnumpy形式に変換し、Listに格納中---------
|
20
20
|
|
@@ -94,13 +94,13 @@
|
|
94
94
|
|
95
95
|
ValueError: Classification metrics can't handle a mix of multiclass-multioutput and binary targets
|
96
96
|
|
97
|
-
|
97
|
+
'''
|
98
98
|
|
99
99
|
|
100
100
|
|
101
101
|
#該当のソースコード(test.py)
|
102
102
|
|
103
|
-
|
103
|
+
'''
|
104
104
|
|
105
105
|
from sklearn.model_selection import train_test_split
|
106
106
|
|
@@ -154,11 +154,11 @@
|
|
154
154
|
|
155
155
|
joblib.dump(mlp,"model.pkl",compress=True)#モデルの保存
|
156
156
|
|
157
|
-
|
157
|
+
'''
|
158
158
|
|
159
159
|
#データセット作成コード(suuuji0420)
|
160
160
|
|
161
|
-
|
161
|
+
'''
|
162
162
|
|
163
163
|
from PIL import Image
|
164
164
|
|
@@ -262,7 +262,7 @@
|
|
262
262
|
|
263
263
|
return suuji
|
264
264
|
|
265
|
-
|
265
|
+
'''
|
266
266
|
|
267
267
|
#備考
|
268
268
|
|
1
出力内容を修正しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -12,9 +12,85 @@
|
|
12
12
|
|
13
13
|
|
14
14
|
|
15
|
-
#エラー
|
15
|
+
#出力内容(最後のほうにエラーがでています)
|
16
|
-
|
16
|
+
|
17
|
-
"""
|
17
|
+
"""
|
18
|
+
|
19
|
+
---------2の画像をnumpy形式に変換し、Listに格納中---------
|
20
|
+
|
21
|
+
---------7の画像をnumpy形式に変換し、Listに格納中---------
|
22
|
+
|
23
|
+
---------8の画像をnumpy形式に変換し、Listに格納中---------
|
24
|
+
|
25
|
+
------------リストをnumpy形式に変換中-----------
|
26
|
+
|
27
|
+
Iteration 1, loss = 175.43883525
|
28
|
+
|
29
|
+
Iteration 2, loss = inf
|
30
|
+
|
31
|
+
Iteration 3, loss = inf
|
32
|
+
|
33
|
+
Iteration 4, loss = inf
|
34
|
+
|
35
|
+
Iteration 5, loss = inf
|
36
|
+
|
37
|
+
Iteration 6, loss = inf
|
38
|
+
|
39
|
+
Iteration 7, loss = inf
|
40
|
+
|
41
|
+
Iteration 8, loss = inf
|
42
|
+
|
43
|
+
Iteration 9, loss = inf
|
44
|
+
|
45
|
+
Iteration 10, loss = inf
|
46
|
+
|
47
|
+
Iteration 11, loss = inf
|
48
|
+
|
49
|
+
Iteration 12, loss = inf
|
50
|
+
|
51
|
+
Training loss did not improve more than tol=0.000100 for 10 consecutive epochs. Stopping.
|
52
|
+
|
53
|
+
精度 0.7
|
54
|
+
|
55
|
+
Traceback (most recent call last):
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
File "<ipython-input-8-a639f0b2b1f0>", line 1, in <module>
|
60
|
+
|
61
|
+
runfile('C:/Users/erifu/Desktop/data0417/test.py', wdir='C:/Users/erifu/Desktop/data0417')
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
File "C:\Users\erifu\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
|
66
|
+
|
67
|
+
execfile(filename, namespace)
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
File "C:\Users\erifu\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
|
72
|
+
|
73
|
+
exec(compile(f.read(), filename, 'exec'), namespace)
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
File "C:/Users/erifu/Desktop/data0417/test.py", line 32, in <module>
|
78
|
+
|
79
|
+
print(metrics.confusion_matrix(data_test,p))
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
File "C:\Users\erifu\Anaconda3\lib\site-packages\sklearn\metrics\classification.py", line 253, in confusion_matrix
|
84
|
+
|
85
|
+
y_type, y_true, y_pred = _check_targets(y_true, y_pred)
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
File "C:\Users\erifu\Anaconda3\lib\site-packages\sklearn\metrics\classification.py", line 81, in _check_targets
|
90
|
+
|
91
|
+
"and {1} targets".format(type_true, type_pred))
|
92
|
+
|
93
|
+
|
18
94
|
|
19
95
|
ValueError: Classification metrics can't handle a mix of multiclass-multioutput and binary targets
|
20
96
|
|