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
binary/multi-class/multi-label statistics #966
Conversation
""" | ||
Computes the number of true negative, false positive, | ||
false negative, true negative and support | ||
for a binary classification problem for a given label. |
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.
[pep8] reported by reviewdog 🐶
DAR101 Missing parameter(s) in Docstring: - label
""" | ||
Computes the number of true negative, false positive, | ||
false negative, true negative and support | ||
for a multi-class classification problem. |
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.
[pep8] reported by reviewdog 🐶
DAR101 Missing parameter(s) in Docstring: - argmax_dim
""" | ||
Computes the number of true negative, false positive, | ||
false negative, true negative and support | ||
for a multi-class classification problem. |
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.
[pep8] reported by reviewdog 🐶
DAR101 Missing parameter(s) in Docstring: - num_classes
catalyst/metrics/functional.py
Outdated
support = torch.zeros((num_classes,), device=outputs.device) | ||
|
||
for class_index in range(num_classes): | ||
outputs_ = outputs[..., class_index] |
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.
[pep8] reported by reviewdog 🐶
WPS120 Found regular name with trailing underscore: outputs_
catalyst/metrics/functional.py
Outdated
|
||
for class_index in range(num_classes): | ||
outputs_ = outputs[..., class_index] | ||
targets_ = targets[..., class_index] |
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.
[pep8] reported by reviewdog 🐶
WPS120 Found regular name with trailing underscore: targets_
), | ||
], | ||
) | ||
def test_get_binary_statistics( |
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.
[pep8] reported by reviewdog 🐶
D103 Missing docstring in public function
), | ||
], | ||
) | ||
def test_get_multiclass_statistics( |
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.
[pep8] reported by reviewdog 🐶
D103 Missing docstring in public function
), | ||
], | ||
) | ||
def test_get_multilabel_statistics( |
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.
[pep8] reported by reviewdog 🐶
D103 Missing docstring in public function
Before submitting
catalyst-make-codestyle && catalyst-check-codestyle
(pip install -U catalyst-codestyle
).make check-docs
?pytest .
?Description
Related Issue
Type of Change
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.