-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
Use type_of_target in all classifiers to reject regression targets #5060
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
Comments
The following classifiers run on regression targets (and do garbage and possibly run very long) from sklearn.datasets import load_boston
boston = load_boston()
from sklearn.utils.testing import all_estimators
classifiers = all_estimators(type_filter="classifier")
for name, Cl in classifiers:
try:
Cl().fit(boston.data, boston.target)
except Exception as e:
pass
else:
print(name)
|
I can try this. |
sure, go for it :) |
Closed by #5084 |
I think we should use
type_of_target
/unique_labels
in all classifiers to reject regression targets. Also adding a common test, clearly.wdyt? @arjoly @jnothman @GaelVaroquaux might be interested.
The text was updated successfully, but these errors were encountered: