1
1
import numbers
2
- import warnings
3
2
from itertools import chain
4
3
from math import ceil
5
4
@@ -63,18 +62,6 @@ class PartialDependenceDisplay:
63
62
deciles : dict
64
63
Deciles for feature indices in ``features``.
65
64
66
- pdp_lim : dict or None
67
- Global min and max average predictions, such that all plots will have
68
- the same scale and y limits. `pdp_lim[1]` is the global min and max for
69
- single partial dependence curves. `pdp_lim[2]` is the global min and
70
- max for two-way partial dependence curves. If `None`, the limit will be
71
- inferred from the global minimum and maximum of all predictions.
72
-
73
- .. deprecated:: 1.1
74
- Pass the parameter `pdp_lim` to
75
- :meth:`~sklearn.inspection.PartialDependenceDisplay.plot` instead.
76
- It will be removed in 1.3.
77
-
78
65
kind : {'average', 'individual', 'both'} or list of such str, \
79
66
default='average'
80
67
Whether to plot the partial dependence averaged across all the samples
@@ -236,7 +223,6 @@ def __init__(
236
223
feature_names ,
237
224
target_idx ,
238
225
deciles ,
239
- pdp_lim = "deprecated" ,
240
226
kind = "average" ,
241
227
subsample = 1000 ,
242
228
random_state = None ,
@@ -246,7 +232,6 @@ def __init__(
246
232
self .features = features
247
233
self .feature_names = feature_names
248
234
self .target_idx = target_idx
249
- self .pdp_lim = pdp_lim
250
235
self .deciles = deciles
251
236
self .kind = kind
252
237
self .subsample = subsample
@@ -1233,27 +1218,6 @@ def plot(
1233
1218
f" of such values. Currently, kind={ self .kind !r} "
1234
1219
)
1235
1220
1236
- # FIXME: remove in 1.3
1237
- if self .pdp_lim != "deprecated" :
1238
- warnings .warn (
1239
- (
1240
- "The `pdp_lim` parameter is deprecated in version 1.1 and will be "
1241
- "removed in version 1.3. Provide `pdp_lim` to the `plot` method."
1242
- "instead."
1243
- ),
1244
- FutureWarning ,
1245
- )
1246
- if pdp_lim is not None and self .pdp_lim != pdp_lim :
1247
- warnings .warn (
1248
- (
1249
- "`pdp_lim` has been passed in both the constructor and the"
1250
- " `plot` method. For backward compatibility, the parameter from"
1251
- " the constructor will be used."
1252
- ),
1253
- UserWarning ,
1254
- )
1255
- pdp_lim = self .pdp_lim
1256
-
1257
1221
# Center results before plotting
1258
1222
if not centered :
1259
1223
pd_results_ = self .pd_results
0 commit comments