Skip to content

Commit

Permalink
BUG: remove n_jobs=-1 from examples
Browse files Browse the repository at this point in the history
  • Loading branch information
GaelVaroquaux committed May 7, 2012
1 parent 67cad73 commit 13028c5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/ensemble/plot_forest_importances_faces.py
Expand Up @@ -19,7 +19,7 @@
from sklearn.ensemble import ExtraTreesClassifier

# Number of cores to use to perform parallel fitting of the forest model
n_jobs = 2
n_jobs = 1

# Loading the digits dataset
data = fetch_olivetti_faces()
Expand Down
2 changes: 1 addition & 1 deletion examples/exercises/plot_cv_diabetes.py
Expand Up @@ -26,7 +26,7 @@

for alpha in alphas:
lasso.alpha = alpha
this_scores = cross_validation.cross_val_score(lasso, X, y, n_jobs=-1)
this_scores = cross_validation.cross_val_score(lasso, X, y, n_jobs=1)
scores.append(np.mean(this_scores))
scores_std.append(np.std(this_scores))

Expand Down
2 changes: 1 addition & 1 deletion examples/exercises/plot_cv_digits.py
Expand Up @@ -23,7 +23,7 @@
scores_std = list()
for C in C_s:
svc.C = C
this_scores = cross_validation.cross_val_score(svc, X, y, n_jobs=-1)
this_scores = cross_validation.cross_val_score(svc, X, y, n_jobs=1)
scores.append(np.mean(this_scores))
scores_std.append(np.std(this_scores))

Expand Down
1 change: 0 additions & 1 deletion examples/plot_digits_pipe.py
Expand Up @@ -49,7 +49,6 @@

###############################################################################
# Prediction
scores = cross_validation.cross_val_score(pipe, X_digits, y_digits, n_jobs=-1)

from sklearn.grid_search import GridSearchCV

Expand Down

0 comments on commit 13028c5

Please sign in to comment.