[GRASS-SVN] r71001 - grass-addons/grass7/raster/r.learn.ml
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue May 2 12:57:32 PDT 2017
Author: spawley
Date: 2017-05-02 12:57:32 -0700 (Tue, 02 May 2017)
New Revision: 71001
Modified:
grass-addons/grass7/raster/r.learn.ml/r_learn_utils.py
Log:
r.learn.ml minor tweaks to multiprocessing
Modified: grass-addons/grass7/raster/r.learn.ml/r_learn_utils.py
===================================================================
--- grass-addons/grass7/raster/r.learn.ml/r_learn_utils.py 2017-05-02 17:18:58 UTC (rev 71000)
+++ grass-addons/grass7/raster/r.learn.ml/r_learn_utils.py 2017-05-02 19:57:32 UTC (rev 71001)
@@ -249,10 +249,11 @@
# -------------------------------------------------------------------------
# Perform multiprocessing fitting of clf on each fold
# -------------------------------------------------------------------------
-
+
# Multiprocessing-backed parallel loops cannot be nested, setting n_jobs=1
if isinstance(clf, (GridSearchCV, RandomizedSearchCV)):
n_jobs = 1
+ print(n_jobs)
clf_resamples = Parallel(n_jobs=n_jobs)(
delayed(parallel_fit)(clf, X, y, groups, train_indices,
@@ -492,8 +493,7 @@
from sklearn.ensemble import (
RandomForestClassifier, RandomForestRegressor, ExtraTreesClassifier,
ExtraTreesRegressor)
- from sklearn.ensemble import GradientBoostingClassifier
- from sklearn.ensemble import GradientBoostingRegressor
+ from sklearn.ensemble import GradientBoostingClassifier, GradientBoostingRegressor
from sklearn.svm import SVC
from sklearn.neighbors import KNeighborsClassifier
More information about the grass-commit
mailing list