回答編集履歴
2
実行結果を追加
test
CHANGED
@@ -46,7 +46,17 @@
|
|
46
46
|
|
47
47
|
print(y)
|
48
48
|
|
49
|
+
# 実行結果
|
50
|
+
|
51
|
+
# [0 1 2]
|
52
|
+
|
53
|
+
|
54
|
+
|
49
55
|
print(cl)
|
56
|
+
|
57
|
+
# 実行結果
|
58
|
+
|
59
|
+
# [-19.453997 -6.501528 2.608242]
|
50
60
|
|
51
61
|
|
52
62
|
|
@@ -56,4 +66,6 @@
|
|
56
66
|
|
57
67
|
main()
|
58
68
|
|
69
|
+
|
70
|
+
|
59
71
|
```
|
1
引用文を追加
test
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
+
> この場合、[ClassLabel]をプラスもしくは0なら0、マイナスなら1などに変換しなければいけないのでしょうか?
|
2
|
+
|
3
|
+
|
4
|
+
|
1
|
-
変換には[LabelEncoder](http://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.LabelEncoder.html#sklearn.preprocessing.LabelEncoder)が使えます。
|
5
|
+
はい、変換(正規化)には[LabelEncoder](http://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.LabelEncoder.html#sklearn.preprocessing.LabelEncoder)が使えます。
|
2
6
|
|
3
7
|
|
4
8
|
|