Skip to content
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

[WIP] raise warning f1_score_micro equals accuracy #513

Closed
wants to merge 3 commits into from
Closed
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
5 changes: 5 additions & 0 deletions skll/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -992,6 +992,11 @@ def _parse_and_validate_metrics(metrics, option_name, logger=None):
" please use the metric "
"\"neg_mean_squared_error\" instead.")

# micro averaged F1 score same as accuracy for multi-class classification
if 'f1_score_micro' in metrics:
logger.warning("The metric \"f1_score_micro\" is the same as "
"\"accuracy\" for multi-class classification")

invalid_metrics = [metric for metric in metrics if metric not in SCORERS]
if invalid_metrics:
raise ValueError('Invalid metric(s) {} '
Expand Down