-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
Bug on partial dependence plot for multiclass classifiers. target_idx is always rewritten. #14301
Copy link
Copy link
Closed
Labels
BugModerateAnything that requires some knowledge of conventions and best practicesAnything that requires some knowledge of conventions and best practiceshelp wanted
Milestone
Description
On function "plot_partial_dependence", I think the "target" parameter is being ignored (in the multiclass setting) since the following line:
| target_idx = 0 |
sets target_idx to 0 every time (ignoring previous lines in which the right column is selected).
When I run:
plot_partial_dependence(rf, X, [feature_column], feature_names=X.columns, target="class_1", response_method="predict_proba", n_jobs=-1)
plot_partial_dependence(rf, X, [feature_column], feature_names=X.columns, target="class_2", response_method="predict_proba", n_jobs=-1) I get the same result two times (and I believe that result to be the "class_1" result)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugModerateAnything that requires some knowledge of conventions and best practicesAnything that requires some knowledge of conventions and best practiceshelp wanted