我的 sklearn 版本是 0.14.1,在 linux Debian GNU/Linux 7.1 上使用 python 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
抛出异常后,随机森林的所有进程都被阻塞