-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
classification metrics #4043
classification metrics #4043
Conversation
Hello @ananyahjha93! Thanks for updating this PR. There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-10-10 15:58:13 UTC |
Codecov Report
@@ Coverage Diff @@
## master #4043 +/- ##
=======================================
Coverage 92% 92%
=======================================
Files 105 107 +2
Lines 7815 7920 +105
=======================================
+ Hits 7194 7298 +104
- Misses 621 622 +1 |
from pytorch_lightning.metrics.utils import METRIC_EPS | ||
|
||
|
||
class Fbeta(Metric): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class Fbeta(Metric): | |
class FBeta(Metric): |
@@ -17,3 +20,31 @@ def dim_zero_mean(x): | |||
|
|||
def _flatten(x): | |||
return [item for sublist in x for item in sublist] | |||
|
|||
|
|||
def to_onehot( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is already in functional/classification
from tests.metrics.utils import compute_batch, setup_ddp | ||
from tests.metrics.utils import THRESHOLD | ||
|
||
from tests.metrics.classification.utils import ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice 👍
maybe include in the function name that these functions are meant for testing
like _testing_inputs_binary_prob
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
f160e38
to
f2f7ec9
Compare
What does this PR do?
adds classification metrics.
Fixes # (issue)
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃