docs: updating docs in partial_dependence.py according to #31304 #31309
+18
−14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR updates the documentation of the
PartialDependenceDisplay
class insklearn/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
:ref:\
Visualization Guide ``.:ref:\
Partial Dependence and ICE plots section <partial_dependence>``.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)
Build the HTML docs (
make html
) and open the Inspection → Partial Dependence page.Confirm that the
PartialDependenceDisplay
class doc now shows two guide links at the top:Repeat for the
from_estimator
method doc.Ensure no rendering errors and that links resolve correctly.
Risks & considerations
Additional information
This is one of several PRs addressing #31304. See related issues/PRs for metric Display classes.