我sklearn版本是0.14.1在Linux上的Debian GNU/Linux的7.1平行随机森林scikit学习抛出一个异常
调用蟒蛇2.7:
clf = RandomForestClassifier(min_samples_split = 10, n_estimators = 50 , n_jobs = 1) is ok
同时呼吁:
clf = RandomForestClassifier(min_samples_split = 10, n_estimators = 50 , n_jobs = 5)
clf.fit(train.toarray(), targets)
抛出以下异常:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.target(self.__args, *self.__kwargs)
File "/usr/lib/python2.7/multiprocessing/pool.py", line 342, in handletasks
put(task)
SystemError: NULL result without error in PyObject_Call
抛出异常后,随机森林的所有进程都被阻塞
是什么形状和D型数据的? – ogrisel
实际上,输入数据与帖子的格式相同,http://stackoverflow.com/questions/19265097/why-does-cross-validation-for-randomforestregressor-fail-in-scikit-learn。 dtype是浮动的。 – mike
但是由于'load_data'没有在该文章中描述,所以无法知道所产生的形状。请打电话给'print(train.shape)'并在结果中加入你的描述。 – ogrisel