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 Tweedie Deviance Score Metric. #499

Conversation

karthikrangasai
Copy link
Contributor

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?

Fixes #73 .

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 🙃

@codecov
Copy link

codecov bot commented Sep 4, 2021

Codecov Report

Merging #499 (150c853) into master (e38cb70) will decrease coverage by 0%.
The diff coverage is 94%.

@@          Coverage Diff          @@
##           master   #499   +/-   ##
=====================================
- Coverage      95%    95%   -0%     
=====================================
  Files         130    132    +2     
  Lines        4586   4652   +66     
=====================================
+ Hits         4373   4425   +52     
- Misses        213    227   +14     

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.

Hi @karthikrangasai, thanks for the PR
It is looking fairly done, but I think it can be improved (memory wise) by not storing all preds and targets in a buffer but instead some intermediate states. Please see comments, and feel free to reach out to me if it is unclear.
Also remember to add note in changelog :]

docs/source/references/functional.rst Outdated Show resolved Hide resolved
docs/source/references/modules.rst Outdated Show resolved Hide resolved
torchmetrics/functional/regression/tweedie_deviance.py Outdated Show resolved Hide resolved
torchmetrics/regression/tweedie_deviance.py Outdated Show resolved Hide resolved
torchmetrics/regression/tweedie_deviance.py Outdated Show resolved Hide resolved
torchmetrics/functional/regression/tweedie_deviance.py Outdated Show resolved Hide resolved
torchmetrics/functional/regression/tweedie_deviance.py Outdated Show resolved Hide resolved
torchmetrics/regression/tweedie_deviance.py Show resolved Hide resolved
torchmetrics/regression/tweedie_deviance.py Outdated Show resolved Hide resolved
torchmetrics/regression/tweedie_deviance.py Outdated Show resolved Hide resolved
torchmetrics/functional/regression/tweedie_deviance.py Outdated Show resolved Hide resolved
torchmetrics/functional/regression/tweedie_deviance.py Outdated Show resolved Hide resolved
torchmetrics/regression/tweedie_deviance.py Show resolved Hide resolved
torchmetrics/regression/tweedie_deviance.py Outdated Show resolved Hide resolved
torchmetrics/regression/tweedie_deviance.py Outdated Show resolved Hide resolved
torchmetrics/regression/tweedie_deviance.py Show resolved Hide resolved
tests/regression/test_tweedie_deviance.py Show resolved Hide resolved
tests/regression/test_tweedie_deviance.py Outdated Show resolved Hide resolved
tests/regression/test_tweedie_deviance.py 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.

LGTM

@SkafteNicki SkafteNicki enabled auto-merge (squash) September 6, 2021 16:54
@mergify mergify bot added the ready label Sep 6, 2021
@SkafteNicki SkafteNicki merged commit 043714e into Lightning-AI:master Sep 6, 2021
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 Deviance scores
3 participants