Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions sklearn/inspection/_plot/partial_dependence.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

@deprecated(
"Function `plot_partial_dependence` is deprecated in 1.0 and will be "
"removed in 1.2. Use PartialDependenceDisplay.from_estimator instead"
"removed in 1.2. Use PartialDependenceDisplay.from_estimator instead."
)
def plot_partial_dependence(
estimator,
Expand All @@ -47,11 +47,15 @@ def plot_partial_dependence(
random_state=None,
centered=False,
):
"""Partial dependence (PD) and individual conditional expectation (ICE)
plots.
"""Partial dependence and individual conditional expectation plots.

Partial dependence plots, individual conditional expectation plots or an
overlay of both of them can be plotted by setting the ``kind``
.. deprecated:: 1.0
`plot_partial_dependence` is deprecated in 1.0 and will be removed in
1.2. Please use the class method:
:func:`~sklearn.metrics.PartialDependenceDisplay.from_estimator`.

Partial dependence plots (PD), individual conditional expectation (ICE)
plots or an overlay of both of them can be plotted by setting the ``kind``
parameter.

The ICE and PD plots can be centered with the parameter `centered`.
Expand Down Expand Up @@ -99,11 +103,6 @@ def plot_partial_dependence(
:class:`~sklearn.ensemble.HistGradientBoostingClassifier` and
:class:`~sklearn.ensemble.HistGradientBoostingRegressor`.

.. deprecated:: 1.0
`plot_partial_dependence` is deprecated in 1.0 and will be removed in
1.2. Please use the class method:
:func:`~sklearn.metrics.PartialDependenceDisplay.from_estimator`.

Parameters
----------
estimator : BaseEstimator
Expand Down Expand Up @@ -297,6 +296,7 @@ def plot_partial_dependence(
Returns
-------
display : :class:`~sklearn.inspection.PartialDependenceDisplay`
Partial Dependence Plot.

See Also
--------
Expand Down
2 changes: 2 additions & 0 deletions sklearn/tests/test_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
FUNCTION_DOCSTRING_IGNORE_LIST = [
"sklearn.decomposition._dict_learning.dict_learning",
"sklearn.externals._packaging.version.parse",
# sklearn.deprecation._update_doc is updating the doc against the numpydoc.
# This will be fixed in future PRs.
"sklearn.inspection._plot.partial_dependence.plot_partial_dependence",
"sklearn.linear_model._least_angle.lars_path_gram",
"sklearn.linear_model._omp.orthogonal_mp_gram",
Expand Down