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

Skip to content

Commit c2e48e0

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

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

sklearn/grid_search.py

+21-4
Original file line numberDiff line numberDiff line change
@@ -670,8 +670,16 @@ 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 + n_jobs + 1)`` are used.
682+
For example, with ``n_jobs = -2`` all CPUs but one are used.
675683
676684
.. versionchanged:: 0.17
677685
Upgraded to joblib 0.9.3.
@@ -888,8 +896,16 @@ class RandomizedSearchCV(BaseSearchCV):
888896
fit_params : dict, optional
889897
Parameters to pass to the fit method.
890898
891-
n_jobs : int, default=1
892-
Number of jobs to run in parallel.
899+
n_jobs: int, default: 1 :
900+
The maximum number of estimators fit in parallel.
901+
902+
- If -1 all CPUs are used.
903+
904+
- If 1 is given, no parallel computing code is used at all,
905+
which is useful for debugging.
906+
907+
- For ``n_jobs`` below -1, ``(n_cpus + n_jobs + 1)`` are used.
908+
For example, with ``n_jobs = -2`` all CPUs but one are used.
893909 667D
894910
pre_dispatch : int, or string, optional
895911
Controls the number of jobs that get dispatched during parallel
@@ -1027,3 +1043,4 @@ def fit(self, X, y=None):
10271043
self.n_iter,
10281044
random_state=self.random_state)
10291045
return self._fit(X, y, sampled_params)
1046+

0 commit comments

Comments
 (0)
0