8000 DOC: updating GridSearchCV's n_jobs parameter · scikit-learn/scikit-learn@5131d3c · GitHub
[go: up one dir, main page]

Skip to content

Commit 5131d3c

Browse files
committed
DOC: updating GridSearchCV's n_jobs parameter
fixes #5797
1 parent dd2e48c commit 5131d3c

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

sklearn/grid_search.py

+22-4
Original file line numberDiff line numberDiff line change
@@ -670,8 +670,17 @@ class GridSearchCV(BaseSearchCV):
670670
fit_params : dict, optional
671671
Parameters to pass to the fit method.
672672
673-
n_jobs : int, default=1
674-
Number of jobs to run in parallel.
673+
n_jobs: int, default: 1 :
674+
The maximum number of estimators fit in parallel.
675+
676+
- If -1 all CPUs are used.
677+
678+
- If 1 is given, no parallel computing code is used at all,
679+
which is useful for debugging.
680+
681+
- For n_jobs below -1, (n_cpus + 1 + n_jobs) are used.
682+
683+
- For n_jobs = -2, all CPUs but one are used.
675684
676685
.. versionchanged:: 0.17
677686
Upgraded to joblib 0.9.3.
@@ -888,8 +897,17 @@ class RandomizedSearchCV(BaseSearchCV):
888897
fit_params : dict, optional
889898
Parameters to pass to the fit method.
890899
891-
n_jobs : int, default=1
892-
Number of jobs to run in parallel.
900+
n_jobs: int, default: 1 :
901+
The maximum number of estimators fit in parallel.
902+
903+
- If -1 all CPUs are used.
904+
905+
- If 1 is given, no parallel computing code is used at all,
906+
which is useful for debugging.
907+
908+
- For n_jobs below -1, (n_cpus + 1 + n_jobs) are used.
909+
910+
- For n_jobs = -2, all CPUs but one are used.
893911
894912
pre_dispatch : int, or string, optional
895913
Controls the number of jobs that get dispatched during parallel

0 commit comments

Comments
 (0)
0