Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MAINT postpone erroring in 1.9 when dealing with integer in PDP #30432

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 11, 2024
Merged
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
4 changes: 2 additions & 2 deletions sklearn/inspection/_partial_dependence.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,14 +705,14 @@ def partial_dependence(
continue

if _safe_indexing(X, feature_idx, axis=1).dtype.kind in "iu":
# TODO(1.8): raise a ValueError instead.
# TODO(1.9): raise a ValueError instead.
warnings.warn(
f"The column {feature!r} contains integer data. Partial "
"dependence plots are not supported for integer data: this "
"can lead to implicit rounding with NumPy arrays or even errors "
"with newer pandas versions. Please convert numerical features"
"to floating point dtypes ahead of time to avoid problems. "
"This will raise ValueError in scikit-learn 1.8.",
"This will raise ValueError in scikit-learn 1.9.",
FutureWarning,
)
# Do not warn again for other features to avoid spamming the caller.
Expand Down
Loading