-
Notifications
You must be signed in to change notification settings - Fork 11
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Known bug in scikit-learn's f1_score metric #97
Comments
This fix would be relevant in tutorials/text_class_example.py, which is used in the text module tutorial |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related to #29734 (scikit-learn/scikit-learn#29734).
Scikit-learn's documentation states that the
pos_label
parameter is ignored in multiclass problems, but it isn't actually ignored. Since it defaults topos_label=1
, which isn't a label found in the dataset, the scoring fails every time, givingnp.nan
.Setting
pos_label=None
explicitly would resolve the problem and havef1_score
work as intended.The text was updated successfully, but these errors were encountered: