Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

DOC Fix UserWarning in plot_gpr_prior_posterior #29380

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

Merged
merged 4 commits into from
Jul 9, 2024

Conversation

ovenpickled
Copy link
Contributor

Reference Issues/PRs

Fixes #29055

What does this implement/fix? Explain your changes.

set normalize_y=True in GaussianProcessRegression

Any other comments?

Please let me know if the implemented changes are correct. I am new to Open-source contribution and I am learning how to contribute efficiently. If there are any more changes required, please feel free to revert back.

Copy link

github-actions bot commented Jul 1, 2024

✔️ Linting Passed

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

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

@ArturoAmorQ
Copy link
Member

In the rendered docs this PR raises a ConvergenceWarning whereas in my local machine this PR raises no warnings. My guess is that something changed in the fmin_l_bfgs_b optimizer with respect to the scipy version we use for building the doc (v.1.6) and my local version (v.1.14).

Maybe @glemaitre (who bumped the last version in #27910) knows better?

@ArturoAmorQ
Copy link
Member

Merging main to see if #29388 fixes the issue.

@ArturoAmorQ
Copy link
Member

The good news is that merging main did solve the UserWarning.
The bad news is that it created a RuntimeWarning somewhere else in the same example.

In any case, we can consider the original intention of #29055 to be solved. So thanks again for your contribution, @ovenpickled. Merging!

@ArturoAmorQ ArturoAmorQ enabled auto-merge (squash) July 9, 2024 08:56
@lesteve
Copy link
Member

lesteve commented Jul 9, 2024

Example from commit before merging main had some ConvergenceWarning in the Dot-product kernel section:

/home/circleci/project/sklearn/gaussian_process/kernels.py:452: ConvergenceWarning:

The optimal value found for dimension 0 of parameter k1__constant_value is close to the specified upper bound 10.0. Increasing the bound and calling fit again may find a better value.

/home/circleci/project/sklearn/gaussian_process/kernels.py:452: ConvergenceWarning:

The optimal value found for dimension 0 of parameter k2__kernel__sigma_0 is close to the specified upper bound 10.0. Increasing the bound and calling fit again may find a better value.

/home/circleci/project/sklearn/gaussian_process/_gpr.py:476: UserWarning:

Predicted variances smaller than 0. Setting those variances to 0.

Example from last commit doesn't have these warning any more but now there is a warning later in the example in the "Rational Quadradtic kernel" section

/home/circleci/project/sklearn/gaussian_process/_gpr.py:521: RuntimeWarning:

covariance is not symmetric positive-semidefinite.

By the way there is a typo "Quadractic" (additonal d) should be "Quadratic", maybe worth fixing in this PR?

@lesteve
Copy link
Member

lesteve commented Jul 9, 2024

I just pushed a commit fixing the typo, if you can double-check c891815 @ArturoAmorQ that would be great.

@ArturoAmorQ
Copy link
Member

I just pushed a commit fixing the typo

Thanks! Nice catch.

@ArturoAmorQ ArturoAmorQ merged commit 79afe99 into scikit-learn:main Jul 9, 2024
30 checks passed
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Sep 9, 2024
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.

UserWarnings in the documentation
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.