Skip to content

Commit 6848353

Browse files
Mention possibility of regression targets in warning about unique classes >50% of n_samples (scikit-learn#31689)
Co-authored-by: Jérémie du Boisberranger <jeremie@probabl.ai>
1 parent e4b0849 commit 6848353

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

sklearn/utils/multiclass.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,8 @@ def _raise_or_return():
418418
# Only raise the warning when we have at least 20 samples.
419419
warnings.warn(
420420
"The number of unique classes is greater than 50% of the number "
421-
"of samples.",
421+
"of samples. `y` could represent a regression problem, not a "
422+
"classification problem.",
422423
UserWarning,
423424
stacklevel=2,
424425
)

0 commit comments

Comments
 (0)