8000 Remove conflicting error messages · scikit-learn/scikit-learn@ef8a85a · GitHub
[go: up one dir, main page]

Skip to content

Commit ef8a85a

Browse files
committed
Remove conflicting error messages
1 parent d94497d commit ef8a85a

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

sklearn/inspection/_plot/partial_dependence.py

-7
Original file line numberDiff line numberDiff line change
@@ -1226,13 +1226,6 @@ def plot(
12261226
f"{len(self.features)} element(s)."
12271227
)
12281228

1229-
valid_kinds = {"average", "individual", "both"}
1230-
if any([k not in valid_kinds for k in kind]):
1231-
raise ValueError(
1232-
f"Values provided to `kind` must be one of: {valid_kinds!r} or a list"
1233-
f" of such values. Currently, kind={self.kind!r}"
1234-
)
1235-
12361229
# FIXME: remove in 1.3
12371230
if self.pdp_lim != "deprecated":
12381231
warnings.warn(

sklearn/inspection/_plot/tests/test_plot_partial_dependence.py

-10
Original file line numberDiff line numberDiff line change
@@ -611,16 +611,6 @@ def test_plot_partial_dependence_dataframe(pyplot, clf_diabetes, diabetes):
611611
{"features": [1], "categorical_features": [1], "kind": "individual"},
612612
"It is not possible to display individual effects",
613613
),
614-
(
615-
dummy_classification_data,
616-
{"features": [1], "kind": "foo"},
617-
"Values provided to `kind` must be one of",
618-
),
619-
(
620-
dummy_classification_data,
621-
{"features": [0, 1], "kind": ["foo", "individual"]},
622-
"Values provided to `kind` must be one of",
623-
),
624614
],
625615
)
626616
def test_plot_partial_dependence_error(pyplot, data, params, err_msg):

0 commit comments

Comments
 (0)
0