Skip to content
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

[New metric] CohenKappa #69

Merged
merged 13 commits into from
Mar 15, 2021
Merged

[New metric] CohenKappa #69

merged 13 commits into from
Mar 15, 2021

Conversation

SkafteNicki
Copy link
Member

@SkafteNicki SkafteNicki commented Mar 13, 2021

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

What does this PR do?

Partly fixes #59.
Issue requests two new metrics. This PR implements the CohenKappa score.

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 🙃

@pep8speaks
Copy link

pep8speaks commented Mar 13, 2021

Hello @SkafteNicki! Thanks for updating this PR.

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-03-15 14:55:23 UTC

@codecov
Copy link

codecov bot commented Mar 13, 2021

Codecov Report

Merging #69 (0354fec) into master (dfc85be) will increase coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #69      +/-   ##
==========================================
+ Coverage   97.08%   97.15%   +0.06%     
==========================================
  Files         118       61      -57     
  Lines        3912     2003    -1909     
==========================================
- Hits         3798     1946    -1852     
+ Misses        114       57      -57     
Flag Coverage Δ
Linux 78.77% <85.10%> (+0.15%) ⬆️
Windows 78.77% <85.10%> (+0.15%) ⬆️
cpu 97.15% <100.00%> (+0.06%) ⬆️
gpu ?
macOS 97.15% <100.00%> (+0.06%) ⬆️
pytest 97.15% <100.00%> (+0.06%) ⬆️
python3.6 97.14% <100.00%> (+0.06%) ⬆️
python3.8 97.15% <100.00%> (+0.06%) ⬆️
python3.9 97.15% <100.00%> (+0.06%) ⬆️
torch1.3.1 95.44% <100.00%> (+0.10%) ⬆️
torch1.4.0 95.60% <100.00%> (+0.10%) ⬆️
torch1.8.0 97.15% <100.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
torchmetrics/__init__.py 100.00% <ø> (ø)
torchmetrics/classification/__init__.py 100.00% <100.00%> (ø)
torchmetrics/classification/cohen_kappa.py 100.00% <100.00%> (ø)
torchmetrics/functional/__init__.py 100.00% <100.00%> (ø)
torchmetrics/functional/classification/__init__.py 100.00% <100.00%> (ø)
...chmetrics/functional/classification/cohen_kappa.py 100.00% <100.00%> (ø)
__w/1/s/torchmetrics/collections.py
.../1/s/torchmetrics/functional/regression/r2score.py
.../s/torchmetrics/functional/classification/auroc.py
...trics/functional/regression/mean_absolute_error.py
... and 57 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dfc85be...0354fec. Read the comment docs.

@SkafteNicki SkafteNicki enabled auto-merge (squash) March 14, 2021 15:43
Copy link
Member

@Borda Borda left a comment

Choose a reason for hiding this comment

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

very clean, great!

@Borda Borda added this to the 0.3 milestone Mar 15, 2021
@SkafteNicki SkafteNicki merged commit 02f0450 into master Mar 15, 2021
@SkafteNicki SkafteNicki deleted the cohen_kappa branch March 15, 2021 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request New metric
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cohen Kappa Score and Matthews Correlation Coefficient Metrics
4 participants