Skip to content

Remove unused scorers - #13318

Merged
agramfort merged 1 commit into
scikit-learn:masterfrom
chkoar:remove_unused_scorers
Feb 28, 2019
Merged

agramfort merged 1 commit into
scikit-learn:masterfrom
chkoar:remove_unused_scorers

Conversation

@chkoar

@chkoar chkoar commented Feb 27, 2019

Copy link
Copy Markdown
Contributor

What does this implement/fix? Explain your changes.

It seems that these scorers are defined but they are not used somewhere, no?

Comment thread sklearn/metrics/scorer.py
average_precision_scorer = make_scorer(average_precision_score,
needs_threshold=True)
precision_scorer = make_scorer(precision_score)
recall_scorer = make_scorer(recall_score)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather add them to SCORERS as they are legit scorers

@chkoar chkoar Feb 28, 2019 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has removed them in favor of ['macro', 'micro', 'samples', 'weighted'] versions. So, they are already there.

@qinhanmin2014

Copy link
Copy Markdown
Member

I guess they're already there, see

for name, metric in [('precision', precision_score),
('recall', recall_score), ('f1', f1_score)]:
SCORERS[name] = make_scorer(metric)
for average in ['macro', 'micro', 'samples', 'weighted']:
qualified_name = '{0}_{1}'.format(name, average)
SCORERS[qualified_name] = make_scorer(metric, pos_label=None,
average=average)

@jnothman

jnothman commented Feb 28, 2019 via email

Copy link
Copy Markdown
Member

@agramfort
agramfort merged commit 8a4cb48 into scikit-learn:master Feb 28, 2019
@agramfort

Copy link
Copy Markdown
Member

alright then !

xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
koenvandevelde pushed a commit to koenvandevelde/scikit-learn that referenced this pull request Jul 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants