scikit learn - sklearn random forest not parallelizing -
i'm using sklearn 0.16 on ubuntu 12.04 , running:
from sklearn.ensemble import randomforestclassifier import numpy np x=np.random.rand(5000,500) y=(np.random.rand(5000).round()) randomforestclassifier(n_jobs=10,n_estimators=1000).fit(x,y)
however it's not using cores, , takes same time n_jobs=1. ideas on how debug what's going on here?
this screenshot shows other things running busy, htop has been showing available cpus:
try :
import affinity import multiprocessing affinity.set_process_affinity_mask(0, 2**multiprocessing.cpu_count()-1)
Comments
Post a Comment