Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC add link to plot_cv_predict example in cross_val_predict doc #31504

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 13 commits into from
Jun 18, 2025

Conversation

sisird864
Copy link
Contributor

Reference Issues/PRs

Towards #30621

What does this implement/fix? Explain your changes.

This adds a new entry under the “See Also” section of the cross_val_predict API docstring in sklearn/model_selection/_validation.py, linking to the plot_cv_predict.py example:

:ref:`plot_cv_predict.py
    <sphx_glr_auto_examples_model_selection_plot_cv_predict.py>`

Copy link

github-actions bot commented Jun 8, 2025

✔️ Linting Passed

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

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

Copy link
Member

@virchan virchan 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 for the PR, @sisird864! I have a few comments.

  1. The hash symbols can be removed.
  2. Please add a blank line between the descriptive text and the Python code.
  3. "For a detailed example of using cross_val_predict to visualize prediction errors, please see <example_link>."

Copy link
Member

@virchan virchan 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 the update, @sisird864! I have a few more comments.

The example you added has split the Python code block in the Examples section in half, which breaks the formatting. Could you please move the text outside the code block?

Copy link
Member

@virchan virchan 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 for updating the PR, @sisird864! I have a few more comments.

Comment on lines 1166 to 1168
For a detailed example of using ``cross_val_predict`` to visualize
prediction errors, please see
:ref:`this example <sphx_glr_auto_examples_model_selection_plot_cv_predict.py>`.
Copy link
Member

Choose a reason for hiding this comment

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

We don't need "this example" inside :ref: here.

Copy link
Member

@virchan virchan left a comment

Choose a reason for hiding this comment

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

Thanks you for updating the PR, @sisird864! Just one more nitpick.

Copy link
Member

@virchan virchan left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @sisird864!

@adrinjalali, @marenwestermann, would you like to have a look and merge this?

@adrinjalali adrinjalali merged commit 9bf3c41 into scikit-learn:main Jun 18, 2025
36 checks passed
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.

3 participants