question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[RFC] Registry for scorers

See original GitHub issue

sklearn.metrics.SCORERS acts like registry for getting predefined scorers in cross_val_score, cross_validate, *SearchCV estimators, etc. If someone wants to use his/her custom scoring functions in the aforementioned functions/classes should define the scoring function, make it scorer using the make_scorer function and pass it around. Another option could be to patch the sklearn.metrics.SCORERS.

Instead of patching directly the SCORERS the make_scorer could optionally register the returned scorer. Another, and probably better, solution could be to create a new decorator or to refactor the make_scorer to act as a decorator (it can actually) that accepts arguments. Like this, one could just define a scoring function and it will be available everywhere in scikit-learn as string. Contrib developers could leverage this functionality as well.

What do you think?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
NicolasHugcommented, May 22, 2020

Thanks for the details

Registering scorers has a bit of a frameworky flavor, and I think we try to avoid that in general.

I think this would need some convincing (not just from me 😉 ), but I’d be happy to see a PR to get a better idea on the additional complexity.

1reaction
NicolasHugcommented, May 9, 2020

Just so I understand properly, the goal is to enable passing strings for custom scorers, instead of passing callables? If so, what is the issue with passing callables?

Read more comments on GitHub >

github_iconTop Results From Across the Web

RFC 7266 - RTP Control Protocol (RTCP) Extended Report ...
RTP Control Protocol (RTCP) Extended Report (XR) Blocks for Mean Opinion Score (MOS) Metric Reporting (RFC 7266, June 2014)
Read more >
Registered Financial Consultant (RFC) - finra
Three years full-time experience as a financial planning practitioner in the field of financial planning or financial planning services. Required licenses to ...
Read more >
Register RFC (process ST 2.1) - Micro Focus
Each RFC must be registered in an identifiable way. Service Manager provides change templates that standardize and speed up the Change Registration process....
Read more >
RFC 7071: A Media Type for Reputation Interchange
Also included is the specification for an IANA registry to contain definitions and symbolic names for known reputation applications and corresponding ...
Read more >
RFC Warnant Club Profile + Latest News, Standings & Squad
Find RFC Warnant Football standings, results, live streaming, team stats, current squad, top goal scorers on Oddspedia.com.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found