Add Tweedie distribution - #3277
Open
timoschowski wants to merge 1 commit into
Open
Conversation
Implement Tweedie distribution following PyTorch PR #171705, suitable for modeling non-negative data with exact zeros (insurance claims, rainfall, intermittent demand). Features: - Tweedie class extending torch.distributions.Distribution - Parameters: mu (mean), dispersion, power (in range 1-2) - Compound Poisson-Gamma sampling algorithm - Saddle-point approximation for log_prob (Dunn & Smyth 2005) - TweedieOutput class for use with GluonTS estimators (DeepAR, etc.) - Learnable mu, dispersion, and power parameters - Proper domain mapping via softplus/sigmoid Includes unit tests for parameter recovery via MLE and distribution properties. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
timoschowski
force-pushed
the
feature/tweedie-distribution
branch
from
February 3, 2026 15:48
90e3fea to
f748a38
Compare
Contributor
Author
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Changes
References
Test plan
pytest test/torch/modules/test_tweedie_distribution_inference.pyfrom gluonts.torch.distributions import TweedieOutput🤖 Generated with Claude Code