Skip to content

DOC Use notebook style in plot_gpr_on_structured_data.py #25132

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

Conversation

ArturoAmorQ
Copy link
Member

Reference Issues/PRs

Related to #22406.

What does this implement/fix? Explain your changes.

The Gaussian processes on discrete data structures example is raising a Matplotlib UserWarning. This PR fixes it while implementing notebook style.

Any other comments?

The example still raises a ConvergenceWarning. I am open to suggestions on how to fix it without making the code too charged.

@glemaitre
Copy link
Member

We still have the following warning:

/home/runner/work/scikit-learn/scikit-learn/sklearn/gaussian_process/kernels.py:420: ConvergenceWarning:

The optimal value found for dimension 0 of parameter baseline_similarity is close to the specified lower bound 1e-05. Decreasing the bound and calling fit again may find a better value.

It might be worth decreasing the lower bound as suggested.

@ArturoAmorQ
Copy link
Member Author

It might be worth decreasing the lower bound as suggested.

For info, we tried doing so with a lower bound as low as 1e-24 and it still raises a warning. Setting the lower bound to exactly zero still raises a ConvergenceWarning plus a RuntimeWarning due to zero division.

@glemaitre
Copy link
Member

OK. Let's revisit the notebook where we would need to dig into the meaning of the kernel used and the associated hyperparameter.

Removing the matplotlib warning and notebook-style structure is already a great improvement.
Merging.

@glemaitre glemaitre merged commit d8592a6 into scikit-learn:main Dec 9, 2022
@glemaitre
Copy link
Member

Thanks @ArturoAmorQ

@ArturoAmorQ ArturoAmorQ deleted the Fix_discrete_gaussian_process branch December 9, 2022 14:49
Vincent-Maladiere pushed a commit to Vincent-Maladiere/scikit-learn that referenced this pull request Dec 14, 2022
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Dec 21, 2022
jjerphan pushed a commit to jjerphan/scikit-learn that referenced this pull request Jan 3, 2023
jjerphan pushed a commit to jjerphan/scikit-learn that referenced this pull request Jan 20, 2023
jjerphan pushed a commit to jjerphan/scikit-learn that referenced this pull request Jan 20, 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.

2 participants