From 52aa0f343f0d824fb520a581a0ebd3b92b9e078b Mon Sep 17 00:00:00 2001 From: Kendrick Cetina Date: Wed, 24 Jun 2020 13:13:56 +0200 Subject: [PATCH 1/6] DOC add missing attributes in GaussianProcessClassifier (#14312) Co-authored-by: Beatriz San Miguel --- sklearn/gaussian_process/_gpc.py | 4 ++++ sklearn/tests/test_docstring_parameters.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sklearn/gaussian_process/_gpc.py b/sklearn/gaussian_process/_gpc.py index 2c9c0ef483d4f..640d69404d8d6 100644 --- a/sklearn/gaussian_process/_gpc.py +++ b/sklearn/gaussian_process/_gpc.py @@ -555,6 +555,10 @@ def optimizer(obj_func, initial_theta, bounds): Attributes ---------- + base_estimator_ : ``_BinaryGaussianProcessClassifierLaplace`` + The estimator template that defines the likelihood function + using the observed data. + kernel_ : kernel instance The kernel used for prediction. In case of binary classification, the structure of the kernel is the same as the one passed as parameter diff --git a/sklearn/tests/test_docstring_parameters.py b/sklearn/tests/test_docstring_parameters.py index 6d79149ca0832..4f2c43f61d97f 100644 --- a/sklearn/tests/test_docstring_parameters.py +++ b/sklearn/tests/test_docstring_parameters.py @@ -229,7 +229,7 @@ def test_fit_docstring_attributes(name, Estimator): assert hasattr(est, attr.name) IGNORED = {'BayesianRidge', 'Birch', 'CCA', 'CategoricalNB', 'ElasticNet', - 'ElasticNetCV', 'GaussianProcessClassifier', + 'ElasticNetCV', 'HistGradientBoostingClassifier', 'HistGradientBoostingRegressor', 'KernelCenterer', 'KernelDensity', From 231d60b1b695fbddfd0a988db1038dd1babbe6b4 Mon Sep 17 00:00:00 2001 From: Kendrick Cetina <67318064+kcetina-fujitsu@users.noreply.github.com> Date: Wed, 24 Jun 2020 14:51:16 +0200 Subject: [PATCH 2/6] Update sklearn/gaussian_process/_gpc.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Loïc Estève --- sklearn/gaussian_process/_gpc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sklearn/gaussian_process/_gpc.py b/sklearn/gaussian_process/_gpc.py index 640d69404d8d6..1d5ed3096e616 100644 --- a/sklearn/gaussian_process/_gpc.py +++ b/sklearn/gaussian_process/_gpc.py @@ -556,7 +556,7 @@ def optimizer(obj_func, initial_theta, bounds): Attributes ---------- base_estimator_ : ``_BinaryGaussianProcessClassifierLaplace`` - The estimator template that defines the likelihood function + The estimator instance that defines the likelihood function using the observed data. kernel_ : kernel instance From f41261085f9342e308fd87af02ea24fcbff22c81 Mon Sep 17 00:00:00 2001 From: Kendrick Cetina Date: Wed, 24 Jun 2020 14:59:04 +0200 Subject: [PATCH 3/6] Simplification of ``base_estimator_`` attribute description. --- sklearn/gaussian_process/_gpc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sklearn/gaussian_process/_gpc.py b/sklearn/gaussian_process/_gpc.py index 640d69404d8d6..94fda53b9d685 100644 --- a/sklearn/gaussian_process/_gpc.py +++ b/sklearn/gaussian_process/_gpc.py @@ -555,7 +555,7 @@ def optimizer(obj_func, initial_theta, bounds): Attributes ---------- - base_estimator_ : ``_BinaryGaussianProcessClassifierLaplace`` + base_estimator_ : ``Estimator`` The estimator template that defines the likelihood function using the observed data. From 057c2e623691e733a4045307e15036a9ed624bdb Mon Sep 17 00:00:00 2001 From: Kendrick Cetina Date: Wed, 24 Jun 2020 15:09:14 +0200 Subject: [PATCH 4/6] Error merge --- sklearn/gaussian_process/_gpc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sklearn/gaussian_process/_gpc.py b/sklearn/gaussian_process/_gpc.py index 94fda53b9d685..640d69404d8d6 100644 --- a/sklearn/gaussian_process/_gpc.py +++ b/sklearn/gaussian_process/_gpc.py @@ -555,7 +555,7 @@ def optimizer(obj_func, initial_theta, bounds): Attributes ---------- - base_estimator_ : ``Estimator`` + base_estimator_ : ``_BinaryGaussianProcessClassifierLaplace`` The estimator template that defines the likelihood function using the observed data. From 924fff60960f4d077c0330bcfff93122ba1e696b Mon Sep 17 00:00:00 2001 From: Kendrick Cetina Date: Wed, 24 Jun 2020 15:10:36 +0200 Subject: [PATCH 5/6] Simplification of ``base_estimator_`` attribute description. --- sklearn/gaussian_process/_gpc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sklearn/gaussian_process/_gpc.py b/sklearn/gaussian_process/_gpc.py index 1d5ed3096e616..e3a5028582e0d 100644 --- a/sklearn/gaussian_process/_gpc.py +++ b/sklearn/gaussian_process/_gpc.py @@ -555,7 +555,7 @@ def optimizer(obj_func, initial_theta, bounds): Attributes ---------- - base_estimator_ : ``_BinaryGaussianProcessClassifierLaplace`` + base_estimator_ : ``Estimator`` The estimator instance that defines the likelihood function using the observed data. From 0e217bc19c90945d3bd702388c2a5f8c765c6e00 Mon Sep 17 00:00:00 2001 From: Kendrick Cetina <67318064+kcetina-fujitsu@users.noreply.github.com> Date: Wed, 24 Jun 2020 16:55:06 +0200 Subject: [PATCH 6/6] Update sklearn/gaussian_process/_gpc.py Co-authored-by: Guillaume Lemaitre --- sklearn/gaussian_process/_gpc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sklearn/gaussian_process/_gpc.py b/sklearn/gaussian_process/_gpc.py index e3a5028582e0d..9f6ed460c4ad5 100644 --- a/sklearn/gaussian_process/_gpc.py +++ b/sklearn/gaussian_process/_gpc.py @@ -555,7 +555,7 @@ def optimizer(obj_func, initial_theta, bounds): Attributes ---------- - base_estimator_ : ``Estimator`` + base_estimator_ : ``Estimator`` instance The estimator instance that defines the likelihood function using the observed data.