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 add cross-reference to examples instead of duplicating content for GPR #20003

Merged
merged 47 commits into from
Sep 12, 2023

Conversation

glemaitre
Copy link
Member

@glemaitre glemaitre commented Apr 28, 2021

follow-up #19952
closes #11562

Revamp the documentation of the Gaussian Process user guide.

TODO:

  • rework the example to use notebook style (done in main)
  • remove example from user guide
  • add references sections
  • add examples links
  • add potential mathematical section

Copy link
Member

@jjerphan jjerphan left a comment

Choose a reason for hiding this comment

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

Thanks for improving those examples @glemaitre. Those are really instructive.

Here are some suggestions from a new-comer to GPR.

doc/modules/gaussian_process.rst Outdated Show resolved Hide resolved
examples/gaussian_process/plot_compare_gpr_krr.py Outdated Show resolved Hide resolved
examples/gaussian_process/plot_compare_gpr_krr.py Outdated Show resolved Hide resolved
examples/gaussian_process/plot_compare_gpr_krr.py Outdated Show resolved Hide resolved
doc/modules/gaussian_process.rst Outdated Show resolved Hide resolved
examples/gaussian_process/plot_gpr_co2.py Outdated Show resolved Hide resolved
examples/gaussian_process/plot_gpr_co2.py Outdated Show resolved Hide resolved
examples/gaussian_process/plot_gpr_co2.py Outdated Show resolved Hide resolved
examples/gaussian_process/plot_gpr_co2.py Outdated Show resolved Hide resolved
examples/gaussian_process/plot_gpr_co2.py Outdated Show resolved Hide resolved
glemaitre and others added 16 commits May 26, 2021 14:23
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
@glemaitre glemaitre changed the title [NOMRG] DOC revamp documentation of GPR DOC revamp documentation of GPR Nov 3, 2021
@glemaitre glemaitre marked this pull request as ready for review August 2, 2023 08:58
@github-actions
Copy link

github-actions bot commented Aug 2, 2023

✔️ Linting Passed

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

Generated for commit: b06bdca. Link to the linter CI: here

@glemaitre
Copy link
Member Author

ping @adrinjalali

I think the following PR addresses some of your proposals discussed IRL when reviewing #26980

@glemaitre glemaitre changed the title DOC revamp documentation of GPR DOC add cross-reference to examples instead of duplicating content for GPR Aug 2, 2023
@adrinjalali
Copy link
Member

I like the changes, but in the listed examples, we see:

image

And I think the second and 4th examples don't have a title which is informative enough for users to know what to expect. We should either change the title, or have a text here before referencing them so that the reader knows what they gain by reading the example.

@glemaitre
Copy link
Member Author

I tried to improve the titles.

@adrinjalali
Copy link
Member

@noashin started reviewing this I think, I'll wait for that before doing another review.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would strongly encourage including the term NONPARAMETRIC when discussing GPs.

I would rephrase the opening (lines 9-11):
Gaussian Processes (GP) are a nonparametric supervised learning method used
to solve regression and probabilistic classification problems.

@@ -27,8 +25,8 @@ The advantages of Gaussian processes are:

The disadvantages of Gaussian processes include:

- They are not sparse, i.e., they use the whole samples/features information to
Copy link
Contributor

Choose a reason for hiding this comment

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

Sparse Gaussian Processes is a thing, just not in Scikit. One defines a set of inducing points (smaller than the data) and use them for learning the GP instead of the data.
This is a good blog post about it.


The noise level in the targets can be specified by passing it via the parameter
`alpha`, either globally as a scalar or per datapoint. Note that a moderate
noise level can also be helpful for dealing with numeric issues during fitting
Copy link
Contributor

Choose a reason for hiding this comment

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

"numerical instabilities" instead of "numerical issues" ?

@glemaitre
Copy link
Member Author

Thanks @noashin. I added the suggestions.

Copy link
Member

@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

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

Are you gonna do another PR for GPC?

Otherwise LGTM.

@@ -77,149 +88,12 @@ the API of standard scikit-learn estimators, GaussianProcessRegressor:
externally for other ways of selecting hyperparameters, e.g., via
Markov chain Monte Carlo.

.. topic:: Examples
Copy link
Member

Choose a reason for hiding this comment

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

maybe rename to gpr_examples? we might easily conflict with another place defining an Examples topic.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a topic and not the name of the section. I don't think you can use this to reference.

@glemaitre
Copy link
Member Author

Are you gonna do another PR for GPC?

Yes. It would be in the same spirit than what we did for GPR.

Copy link
Member

@jjerphan jjerphan left a comment

Choose a reason for hiding this comment

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

Thank you, @glemaitre.

@jjerphan jjerphan enabled auto-merge (squash) September 11, 2023 14:05
@lesteve lesteve merged commit 0684a89 into scikit-learn:main Sep 12, 2023
23 of 25 checks passed
@lesteve
Copy link
Member

lesteve commented Sep 12, 2023

No idea why but one Azure build was timing out, since this is a doc PR, I merged it manually.

glemaitre added a commit to glemaitre/scikit-learn that referenced this pull request Sep 18, 2023
…r GPR (scikit-learn#20003)

Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
jeremiedbb pushed a commit that referenced this pull request Sep 20, 2023
…r GPR (#20003)

Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
REDVM pushed a commit to REDVM/scikit-learn that referenced this pull request Nov 16, 2023
…r GPR (scikit-learn#20003)

Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
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.

plot_gpr_prior_posterior.py unstable
5 participants