From 7ffe084afc7e3e18a97826a2c518dee9ed2db379 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Sun, 11 Aug 2019 09:43:01 -0400 Subject: [PATCH 1/2] n_jobs description --- sklearn/ensemble/forest.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/sklearn/ensemble/forest.py b/sklearn/ensemble/forest.py index a3513fdf32e41..8c382b2a787dd 100644 --- a/sklearn/ensemble/forest.py +++ b/sklearn/ensemble/forest.py @@ -868,7 +868,9 @@ class RandomForestClassifier(ForestClassifier): the generalization accuracy. n_jobs : int or None, optional (default=None) - The number of jobs to run in parallel for both `fit` and `predict`. + The number of jobs to run in parallel. + `fit`, `predict`, ``decision_path`` and ``apply`` are all + parallelized over the trees. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. See :term:`Glossary ` for more details. @@ -1157,7 +1159,9 @@ class RandomForestRegressor(ForestRegressor): the R^2 on unseen data. n_jobs : int or None, optional (default=None) - The number of jobs to run in parallel for both `fit` and `predict`. + The number of jobs to run in parallel. + `fit`, `predict`, ``decision_path`` and ``apply`` are all + parallelized over the trees. `None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. See :term:`Glossary ` for more details. @@ -1406,7 +1410,9 @@ class ExtraTreesClassifier(ForestClassifier): the generalization accuracy. n_jobs : int or None, optional (default=None) - The number of jobs to run in parallel for both `fit` and `predict`. + The number of jobs to run in parallel. + `fit`, `predict`, ``decision_path`` and ``apply`` are all + parallelized over the trees. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. See :term:`Glossary ` for more details. @@ -1671,7 +1677,9 @@ class ExtraTreesRegressor(ForestRegressor): Whether to use out-of-bag samples to estimate the R^2 on unseen data. n_jobs : int or None, optional (default=None) - The number of jobs to run in parallel for both `fit` and `predict`. + The number of jobs to run in parallel. + `fit`, `predict`, ``decision_path`` and ``apply`` are all + parallelized over the trees. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. See :term:`Glossary ` for more details. @@ -1874,7 +1882,9 @@ class RandomTreesEmbedding(BaseForest): or to return a dense array compatible with dense pipeline operators. n_jobs : int or None, optional (default=None) - The number of jobs to run in parallel for both `fit` and `predict`. + The number of jobs to run in parallel. + Trees are built in parallel during `fit`. During `transform`, the leaf + indices computation is also parallelized over trees. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. See :term:`Glossary ` for more details. From 45798410baa6f10b118fdc3cefd7608cbe7fcfe5 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Mon, 12 Aug 2019 08:32:47 -0400 Subject: [PATCH 2/2] Used single backticks for linking + document apply and decision_pth --- sklearn/ensemble/forest.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sklearn/ensemble/forest.py b/sklearn/ensemble/forest.py index 8c382b2a787dd..332e197583c97 100644 --- a/sklearn/ensemble/forest.py +++ b/sklearn/ensemble/forest.py @@ -869,7 +869,7 @@ class RandomForestClassifier(ForestClassifier): n_jobs : int or None, optional (default=None) The number of jobs to run in parallel. - `fit`, `predict`, ``decision_path`` and ``apply`` are all + `fit`, `predict`, `decision_path` and `apply` are all parallelized over the trees. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. See :term:`Glossary ` @@ -1160,7 +1160,7 @@ class RandomForestRegressor(ForestRegressor): n_jobs : int or None, optional (default=None) The number of jobs to run in parallel. - `fit`, `predict`, ``decision_path`` and ``apply`` are all + `fit`, `predict`, `decision_path` and `apply` are all parallelized over the trees. `None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. See :term:`Glossary ` @@ -1411,7 +1411,7 @@ class ExtraTreesClassifier(ForestClassifier): n_jobs : int or None, optional (default=None) The number of jobs to run in parallel. - `fit`, `predict`, ``decision_path`` and ``apply`` are all + `fit`, `predict`, `decision_path` and `apply` are all parallelized over the trees. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. See :term:`Glossary ` @@ -1678,7 +1678,7 @@ class ExtraTreesRegressor(ForestRegressor): n_jobs : int or None, optional (default=None) The number of jobs to run in parallel. - `fit`, `predict`, ``decision_path`` and ``apply`` are all + `fit`, `predict`, `decision_path` and `apply` are all parallelized over the trees. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. See :term:`Glossary ` @@ -1883,8 +1883,8 @@ class RandomTreesEmbedding(BaseForest): n_jobs : int or None, optional (default=None) The number of jobs to run in parallel. - Trees are built in parallel during `fit`. During `transform`, the leaf - indices computation is also parallelized over trees. + `fit`, `transform`, `decision_path` and `apply` are all + parallelized over the trees. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. See :term:`Glossary ` for more details.