importerrorで進めず困っています
anacondaのspyderでプログラム実行を使用したところでエラーが出ています。
一応、別のパソコンでpip installですべてのモジュールやフレームワークを入れましたが同様のエラーが出ます。
from文がいけないのでしょうか?
発生している問題・エラーメッセージ
from sklearn.svm import LinearSVG
from sklearn.metrics import accuracy_score
learn_data = [[0, 0], [1, 0], [0, 1], [1, 1]]
learn_label = [0, 0, 0, 1]
clf = LinearSVG()
clf.fit(learn_data, learn_labe)
test_data = [[0, 0], [1, 0], [0, 1], [1, 1]]
test_label = clf.predict(test_data)
print(test_data, "の予測結果:", test_label)
print("正解率 = ", accuracy_score([0, 0, 0, 1], test_label))
補足情報(FW/ツールのバージョンなど)
Anaconda3 Python 3.7.3
メッセージ”ImportError: cannot import name 'LinearSVG' from 'sklearn.svm'”
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/05/28 22:52