 is `'brute'`.

features : list of {int, str, pair of int, pair of str}
    The target features for which to create the PDPs.
    If `features[i]` is an integer or a string, a one-way PDP is created;
    if `features[i]` is a tuple, a two-way PDP is created (only supported
    with `kind='average'`). Each tuple must be of size 2.
    If any entry is a string, then it must be in ``feature_names``.

sample_weight : array-like of shape (n_samples,), default=None
    Sample weights are used to calculate weighted means when averaging the
    model output. If `None`, then samples are equally weighted. If
    `sample_weight` is not `None`, then `method` will be set to `'brute'`.
    Note that `sample_weight` is ignored for `kind='individual'`.

    .. versionadded:: 1.3

categorical_features : array-like of shape (n_features,) or shape                 (n_categorical_features,), dtype={bool, int, str}, default=None
    Indicates the categorical features.

    - `None`: no feature will be considered categorical;
    - boolean array-like: boolean mask of shape `(n_features,)`
      indicating which features are categorical. Thus, this array has
      the same shape has `X.shape[1]`;
    - integer or string array-like: integer indices or strings
      indicating categorical features.

    .. versionadded:: 1.2

feature_names : array-like of shape (n_features,), dtype=str, default=None
    Name of each feature; `feature_names[i]` holds the name of the feature
    with index `i`.
    By default, the name of the feature corresponds to their numerical
    index for NumPy array and their column name for pandas dataframe.

target : int, default=None
    - In a multiclass setting, specifies the class for which the PDPs
      should be computed. Note that for binary classification, the
      positive class (index 1) is always used.
    - In a multioutput setting, specifies the task for which the PDPs
      should be computed.

    Ignored in binary classification or classical regression settings.

response_method : {'auto', 'predict_proba', 'decision_function'},                 default='auto'
    Specifies whether to use :term:`predict_proba` or
    :term:`decision_function` as the target response. For regressors
    this parameter is ignored and the response is always the output of
    :term:`predict`. By default, :term:`predict_proba` is tried first
    and we revert to :term:`decision_function` if it doesn't exist. If
    ``method`` is `'recursion'`, the response is always the output of
    :term:`decision_function`.

n_cols : int, default=3
    The maximum number of columns in the grid plot. Only active when `ax`
    is a single axis or `None`.

grid_resolution : int, default=100
    The number of equally spaced points on the axes of the plots, for each
    target feature.

percentiles : tuple of float, default=(0.05, 0.95)
    The lower and upper percentile used to create the extreme values
    for the PDP axes. Must be in [0, 1].

method : str, default='auto'
    The method used to calculate the averaged predictions:

    - `'recursion'` is only supported for some tree-based estimators
      (namely
      :class:`~sklearn.ensemble.GradientBoostingClassifier`,
      :class:`~sklearn.ensemble.GradientBoostingRegressor`,
      :class:`~sklearn.ensemble.HistGradientBoostingClassifier`,
      :class:`~sklearn.ensemble.HistGradientBoostingRegressor`,
      :class:`~sklearn.tree.DecisionTreeRegressor`,
      :class:`~sklearn.ensemble.RandomForestRegressor`
      but is more efficient in terms of speed.
      With this method, the target response of a
      classifier is always the decision function, not the predicted
      probabilities. Since the `'recursion'` method implicitly computes
      the average of the ICEs by design, it is not compatible with ICE and
      thus `kind` must be `'average'`.

    - `'brute'` is supported for any estimator, but is more
      computationally intensive.

    - `'auto'`: the `'recursion'` is used for estimators that support it,
      and `'brute'` is used otherwise. If `sample_weight` is not `None`,
      then `'brute'` is used regardless of the estimator.

    Please see :ref:`this note <pdp_method_differences>` for
    differences between the `'brute'` and `'recursion'` method.

n_jobs : int, default=None
    The number of CPUs to use to compute the partial dependences.
    Computation is parallelized over features specified by the `features`
    parameter.

    ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context.
    ``-1`` means using all processors. See :term:`Glossary <n_jobs>`
    for more details.

verbose : int, default=0
    Verbose output during PD computations.

line_kw : dict, default=None
    Dict with keywords passed to the ``matplotlib.pyplot.plot`` call.
    For one-way partial dependence plots. It can be used to define common
    properties for both `ice_lines_kw` and `pdp_line_kw`.

ice_lines_kw : dict, default=None
    Dictionary with keywords passed to the `matplotlib.pyplot.plot` call.
    For ICE lines in the one-way partial dependence plots.
    The key value pairs defined in `ice_lines_kw` takes priority over
    `line_kw`.

pd_line_kw : dict, default=None
    Dictionary with keywords passed to the `matplotlib.pyplot.plot` call.
    For partial dependence in one-way partial dependence plots.
    The key value pairs defined in `pd_line_kw` takes priority over
    `line_kw`.

contour_kw : dict, default=None
    Dict with keywords passed to the ``matplotlib.pyplot.contourf`` call.
    For two-way partial dependence plots.

ax : Matplotlib axes or array-like of Matplotlib axes, default=None
    - If a single axis is passed in, it is treated as a bounding axes
      and a grid of partial dependence plots will be drawn within
      these bounds. The `n_cols` parameter controls the number of
      columns in the grid.
    - If an array-like of axes are passed in, the partial dependence
      plots will be drawn directly into these axes.
    - If `None`, a figure and a bounding axes is created and treated
      as the single axes case.

kind : {'average', 'individual', 'both'}, default='average'
    Whether to plot the partial dependence averaged across all the samples
    in the dataset or one line per sample or both.

    - ``kind='average'`` results in the traditional PD plot;
    - ``kind='individual'`` results in the ICE plot.

    Note that the fast `method='recursion'` option is only available for
    `kind='average'` and `sample_weights=None`. Computing individual
    dependencies and doing weighted averages requires using the slower
    `method='brute'`.

centered : bool, default=False
    If `True`, the ICE and PD lines will start at the origin of the
    y-axis. By default, no centering is done.

    .. versionadded:: 1.1

subsample : float, int or None, default=1000
    Sampling for ICE curves when `kind` is 'individual' or 'both'.
    If `float`, should be between 0.0 and 1.0 and represent the proportion
    of the dataset to be used to plot ICE curves. If `int`, represents the
    absolute number samples to use.

    Note that the full dataset is still used to calculate averaged partial
    dependence when `kind='both'`.

random_state : int, RandomState instance or None, default=None
    Controls the randomness of the selected samples when subsamples is not
    `None` and `kind` is either `'both'` or `'individual'`.
    See :term:`Glossary <random_state>` for details.

Returns
-------
display : :class:`~sklearn.inspection.PartialDependenceDisplay`

See Also
--------
partial_dependence : Compute Partial Dependence values.

Examples
--------
>>> import matplotlib.pyplot as plt
>>> from sklearn.datasets import make_friedman1
>>> from sklearn.ensemble import GradientBoostingRegressor
>>> from sklearn.inspection import PartialDependenceDisplay
>>> X, y = make_friedman1()
>>> clf = GradientBoostingRegressor(n_estimators=10).fit(X, y)
>>> PartialDependenceDisplay.from_estimator(clf, X, [0, (0, 1)])
<...>
>>> plt.show()
z.from_estimatorr