Skip to content

Commit fc40a14

Browse files
authored
DOC Update docstring in partial_dependence.py (scikit-learn#31309)
1 parent 8cfc72b commit fc40a14

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

sklearn/inspection/_plot/partial_dependence.py

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,17 @@
2525

2626

2727
class PartialDependenceDisplay:
28-
"""Partial Dependence Plot (PDP).
29-
30-
This can also display individual partial dependencies which are often
31-
referred to as: Individual Condition Expectation (ICE).
28+
"""Partial Dependence Plot (PDP) and Individual Conditional Expectation (ICE).
3229
3330
It is recommended to use
3431
:func:`~sklearn.inspection.PartialDependenceDisplay.from_estimator` to create a
35-
:class:`~sklearn.inspection.PartialDependenceDisplay`. All parameters are
36-
stored as attributes.
32+
:class:`~sklearn.inspection.PartialDependenceDisplay`. All parameters are stored
33+
as attributes.
3734
3835
For general information regarding `scikit-learn` visualization tools, see
3936
the :ref:`Visualization Guide <visualizations>`.
4037
For guidance on interpreting these plots, refer to the
41-
:ref:`Partial Dependence and ICE plots <partial_dependence>`.
38+
:ref:`Inspection Guide <partial_dependence>`.
4239
4340
For an example on how to use this class, see the following example:
4441
:ref:`sphx_glr_auto_examples_miscellaneous_plot_partial_dependence_visualization_api.py`.
@@ -280,17 +277,21 @@ def from_estimator(
280277
):
281278
"""Partial dependence (PD) and individual conditional expectation (ICE) plots.
282279
283-
Partial dependence plots, individual conditional expectation plots or an
284-
overlay of both of them can be plotted by setting the ``kind``
285-
parameter. The ``len(features)`` plots are arranged in a grid with
286-
``n_cols`` columns. Two-way partial dependence plots are plotted as
287-
contour plots. The deciles of the feature values will be shown with tick
288-
marks on the x-axes for one-way plots, and on both axes for two-way
289-
plots.
290-
291-
Read more in
292-
:ref:`sphx_glr_auto_examples_inspection_plot_partial_dependence.py`
293-
and the :ref:`User Guide <partial_dependence>`.
280+
Partial dependence plots, individual conditional expectation plots, or an
281+
overlay of both can be plotted by setting the `kind` parameter.
282+
This method generates one plot for each entry in `features`. The plots
283+
are arranged in a grid with `n_cols` columns. For one-way partial
284+
dependence plots, the deciles of the feature values are shown on the
285+
x-axis. For two-way plots, the deciles are shown on both axes and PDPs
286+
are contour plots.
287+
288+
For general information regarding `scikit-learn` visualization tools, see
289+
the :ref:`Visualization Guide <visualizations>`.
290+
For guidance on interpreting these plots, refer to the
291+
:ref:`Inspection Guide <partial_dependence>`.
292+
293+
For an example on how to use this class method, see
294+
:ref:`sphx_glr_auto_examples_inspection_plot_partial_dependence.py`.
294295
295296
.. note::
296297

0 commit comments

Comments
 (0)