-
Notifications
You must be signed in to change notification settings - Fork 415
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
[Refactor] Classification 5/n #1159
Conversation
Codecov Report
@@ Coverage Diff @@
## devel/classification #1159 +/- ##
=====================================================
- Coverage 92% 91% -0%
=====================================================
Files 185 187 +2
Lines 9513 9642 +129
=====================================================
+ Hits 8731 8805 +74
- Misses 782 837 +55 |
preds = preds.reshape(*preds.shape[:2], -1) | ||
target = target.reshape(*target.shape[:2], -1) | ||
|
||
if multidim_average == "global": |
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.
Can we split as two functions as they effectively are...
assert torch.allclose(noneavg["res1"], result1, equal_nan=True) | ||
result2 = acc(noneavg["pred2"], noneavg["target2"]) | ||
assert torch.allclose(noneavg["res2"], result2, equal_nan=True) | ||
# -------------------------- Old stuff -------------------------- |
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.
let's add todo for removal after merging back to master...
* base structure * partly working accuracy * init files * working accuracy * exact match * mix mistake * exact matching * init files * fix doctest * mypy * fix docs * fix integer division * try fixing test dependency * fix f-string * fix integer division * fix integer division * fix? * try again * fix pep8 * docs * try something Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* base structure * partly working accuracy * init files * working accuracy * exact match * mix mistake * exact matching * init files * fix doctest * mypy * fix docs * fix integer division * try fixing test dependency * fix f-string * fix integer division * fix integer division * fix? * try again * fix pep8 * docs * try something Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* base structure * partly working accuracy * init files * working accuracy * exact match * mix mistake * exact matching * init files * fix doctest * mypy * fix docs * fix integer division * try fixing test dependency * fix f-string * fix integer division * fix integer division * fix? * try again * fix pep8 * docs * try something Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* base structure * partly working accuracy * init files * working accuracy * exact match * mix mistake * exact matching * init files * fix doctest * mypy * fix docs * fix integer division * try fixing test dependency * fix f-string * fix integer division * fix integer division * fix? * try again * fix pep8 * docs * try something Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* base structure * partly working accuracy * init files * working accuracy * exact match * mix mistake * exact matching * init files * fix doctest * mypy * fix docs * fix integer division * try fixing test dependency * fix f-string * fix integer division * fix integer division * fix? * try again * fix pep8 * docs * try something Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
What does this PR do?
Continues work on classification refactor #1001
Prior work:
This PR takes care of
accuracy
metric. Old implementation had an argumentsubset_accuracy
to determine if subset accuracy (known as exact match also) should be calculated. To standardize with the rest of the metrics, this argument has been split into its own metricexact_match
. This metric is then only implemented in the multilabel case, where this kind of evaluation is used.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 🙃