Skip to content

docs: updating docs in partial_dependence.py according to #31304 #31309

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Azzedde
Copy link

@Azzedde Azzedde commented May 5, 2025

Summary

This PR updates the documentation of the PartialDependenceDisplay class in sklearn/inspection/_plot/partial_dependence.py to mirror the style of other Display objects by linking both to the general Visualization API guide and to the interpretation section for partial dependence and ICE plots (issue #31304).

Changes

  • Changed the one-line summary to mention both PDP and ICE visualization.
  • Added a “For general information…” link to the :ref:\Visualization Guide ``.
  • Added a “For guidance on interpreting…” link to the :ref:\Partial Dependence and ICE plots section <partial_dependence>``.
  • Removed the old “Read more in … and the User Guide” phrasing and replaced with the dual-link format.

Motivation

Some Display classes in scikit-learn inconsistently point only to their low-level plotting function or only to the Visualizations guide. To give users both “how do I use this API?” and “what does this plot mean?” contexts, we standardize on dual linking—just like RocCurveDisplay.
Closes #31304.

How to test (if relevant)

  1. Build the HTML docs (make html) and open the Inspection → Partial Dependence page.

  2. Confirm that the PartialDependenceDisplay class doc now shows two guide links at the top:

    • “Visualization Guide” (general API)
    • “Partial Dependence and ICE plots section” (interpretation)
  3. Repeat for the from_estimator method doc.

  4. Ensure no rendering errors and that links resolve correctly.

Risks & considerations

  • Rendering: Verify the added RST references exist and render without broken links.
  • Backwards compatibility: Documentation only; no API behavior changes.
  • Consistency: Other Display docs will need similar updates (e.g. ConfusionMatrixDisplay, DetCurveDisplay, PrecisionRecallDisplay).

Additional information

This is one of several PRs addressing #31304. See related issues/PRs for metric Display classes.

Copy link

github-actions bot commented May 5, 2025

✔️ Linting Passed

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

Generated for commit: 35f17b0. Link to the linter CI: here

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.

DOC Link Visualization tools to their respective interpretation in the User Guide
1 participant