SGDClassifier 内核在使用 scikit 时死亡 [英] SGDClassifier kernel dies when using scikit
问题描述
我尝试了这个非常简单的例子
I tried this very simple example
import numpy as np
from sklearn import linear_model
X = np.array([[-1, -1], [-2, -1], [1, 1], [2, 1]])
Y = np.array([1, 1, 2, 2])
clf = linear_model.SGDClassifier()
clf.fit(X, Y)
但内核立即死亡
Kernel died, restarting
拟合随机森林没有问题:
Fitting a Random Forest works without problem:
from sklearn import ensemble
clf2 = ensemble.RandomForestClassifier()
clf2.fit(X, Y)
我不知道为什么会发生这种情况.我在 ubuntu 16.04 64 位系统上使用当前版本的 anaconda3 和所有更新.
I have no idea why this occurs. I am using the current version of anaconda3 with all updates on a ubuntu 16.04 64bit system.
更新:我刚刚发现 linear_model
类中的所有模型都会发生这种情况
UPDATE: I just found that this happens with all model from the linear_model
class
UPDATE2:MKL 是问题所在,如下所述:https://github.com/scikit-learn/scikit-learn/issues/5046
UPDATE2: MKL was the problem, as described here: https://github.com/scikit-learn/scikit-learn/issues/5046
和 conda install nomkl
修复了它.
推荐答案
MKL 是问题所在,如下所述:https://github.com/scikit-learn/scikit-learn/issues/5046
MKL is the problem, as described here: https://github.com/scikit-learn/scikit-learn/issues/5046
和 conda install nomkl
修复它.
这篇关于SGDClassifier 内核在使用 scikit 时死亡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!