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

Add Tschuprow's T and Pearson's Contingency Coefficient #1334

Merged
merged 22 commits into from
Nov 15, 2022

Conversation

stancld
Copy link
Contributor

@stancld stancld commented Nov 14, 2022

What does this PR do?

Fixes #1299
fixes #1335

This MR adds Tschuprow's T, and (very similar) Pearson's Contingency Coefficient

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?

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 🙃

@stancld stancld added this to the v0.11 milestone Nov 14, 2022
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.

LGTM :)

requirements/nominal_test.txt Outdated Show resolved Hide resolved
src/torchmetrics/nominal/pearson.py Outdated Show resolved Hide resolved
src/torchmetrics/nominal/tschuprows.py Outdated Show resolved Hide resolved
tests/unittests/nominal/test_pearson.py Outdated Show resolved Hide resolved
Copy link
Member

@SkafteNicki SkafteNicki left a comment

Choose a reason for hiding this comment

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

very few comments :]
already looking really good @stancld

src/torchmetrics/functional/nominal/pearson.py Outdated Show resolved Hide resolved
src/torchmetrics/functional/nominal/pearson.py Outdated Show resolved Hide resolved
src/torchmetrics/functional/nominal/pearson.py Outdated Show resolved Hide resolved
src/torchmetrics/functional/__init__.py Outdated Show resolved Hide resolved
src/torchmetrics/functional/nominal/tschuprows.py Outdated Show resolved Hide resolved
src/torchmetrics/nominal/pearson.py Outdated Show resolved Hide resolved
src/torchmetrics/nominal/tschuprows.py Outdated Show resolved Hide resolved
src/torchmetrics/nominal/tschuprows.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Nov 14, 2022

Codecov Report

Merging #1334 (b094e9b) into master (3188728) will decrease coverage by 54%.
The diff coverage is 96%.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #1334     +/-   ##
========================================
- Coverage      87%     33%    -54%     
========================================
  Files         200     204      +4     
  Lines       11474   11621    +147     
========================================
- Hits         9951    3851   -6100     
- Misses       1523    7770   +6247     

Copy link
Member

@SkafteNicki SkafteNicki left a comment

Choose a reason for hiding this comment

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

Just a bit of nitpicking else LGTM :]

src/torchmetrics/nominal/cramers.py Outdated Show resolved Hide resolved
src/torchmetrics/nominal/pearson.py Outdated Show resolved Hide resolved
src/torchmetrics/nominal/tschuprows.py Outdated Show resolved Hide resolved
src/torchmetrics/nominal/tschuprows.py Show resolved Hide resolved
src/torchmetrics/nominal/pearson.py Show resolved Hide resolved
@mergify mergify bot added the ready label Nov 15, 2022
Co-authored-by: Nicki Skafte Detlefsen <[email protected]>
@SkafteNicki
Copy link
Member

@Borda please re-review :]

CHANGELOG.md Outdated Show resolved Hide resolved
src/torchmetrics/functional/nominal/pearson.py Outdated Show resolved Hide resolved
src/torchmetrics/functional/nominal/pearson.py Outdated Show resolved Hide resolved
src/torchmetrics/functional/nominal/pearson.py Outdated Show resolved Hide resolved
src/torchmetrics/functional/nominal/tschuprows.py Outdated Show resolved Hide resolved
src/torchmetrics/functional/nominal/tschuprows.py Outdated Show resolved Hide resolved
src/torchmetrics/functional/nominal/utils.py Outdated Show resolved Hide resolved
src/torchmetrics/nominal/pearson.py Outdated Show resolved Hide resolved
src/torchmetrics/nominal/tschuprows.py Outdated Show resolved Hide resolved
@stancld stancld enabled auto-merge (squash) November 15, 2022 18:27
@mergify mergify bot removed the ready label Nov 15, 2022
@mergify mergify bot added the ready label Nov 15, 2022
@stancld stancld merged commit c3d420e into master Nov 15, 2022
@stancld stancld deleted the metric/tschuprow-t branch November 15, 2022 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Pearson's Contingency Coefficient Add Tschuprow's T
3 participants