Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC Added example link to Gaussian process regressor #26980

Merged
merged 1 commit into from
Aug 11, 2023

Conversation

mecopur
Copy link
Contributor

@mecopur mecopur commented Aug 1, 2023

Reference Issues/PRs:

26927

What does this implement/fix? Explain your changes.

Added example plot_compare_gpr_krr.py link to kernel_ridge.py and _gpr.py

@github-actions
Copy link

github-actions bot commented Aug 1, 2023

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 62dee06. Link to the linter CI: here

@@ -129,6 +129,9 @@ class KernelRidge(MultiOutputMixin, RegressorMixin, BaseEstimator):
>>> krr = KernelRidge(alpha=1.0)
>>> krr.fit(X, y)
KernelRidge(alpha=1.0)

See :ref:`sphx_glr_auto_examples_gaussian_process_plot_compare_gpr_krr.py`
for an example to compare kernel ridge and Gaussian process regression
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at the documentation of the KernelRidge and we have a few examples (three of them). I think that the title currently is self-explicit and we don't need to add a new cross-reference here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the example from KernelRidge, can you please review? Thanks!

Comment on lines 183 to 185

See :ref:`sphx_glr_auto_examples_gaussian_process_plot_compare_gpr_krr.py`
for an example to compare kernel ridge and Gaussian process regression
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move this reference to the general summary at the top of the file just before mentioning the user-guide.

I think that this example is actually didactic to understand the difference between a frequentist approach (KernelRidge) and the more Bayesian approach (GaussianProcessRegressor).

I think that we should rephrase as:

    To learn the difference between a point-estimate approach vs. a more
    Bayesian modelling approach, refer to the example entitled
    :ref:`sphx_glr_auto_examples_gaussian_process_plot_compare_gpr_krr.py`.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the suggested changes in GaussianProcessRegressor, can you please review? Thanks!

@mecopur mecopur changed the title DOC added plot_compare_gpr_krr.py link to kernel ridge and gaussian process regressor DOC Added example link to Gaussian process regressor Aug 3, 2023
Copy link
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Merging then @mecopur.

@glemaitre glemaitre merged commit 3419e8c into scikit-learn:main Aug 11, 2023
32 checks passed
TamaraAtanasoska pushed a commit to TamaraAtanasoska/scikit-learn that referenced this pull request Aug 21, 2023
akaashpatelmns pushed a commit to akaashp2000/scikit-learn that referenced this pull request Aug 25, 2023
@mecopur mecopur deleted the plot_compare_gpr_krr branch August 28, 2023 20:42
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Sep 18, 2023
REDVM pushed a commit to REDVM/scikit-learn that referenced this pull request Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants