Open fsaforo1 opened 1 month ago
@fsaforo1, this is expected because the model you are constructing actually has a normal predictive distribution, with reg_mean
predicting the variance, and reg_resid
the residual, so it wil not have non-negative support.
If you want the predictive distribution to be Tweedie, and hence non-negative, the two closest things are:
using the GLMRegressor
, this has links which are sub-cases of Tweedie (but not arbitrary Tweedie)
using a Tweedie distribution as the base distribution, for distr_type
A general Tweedie distribution is not yet implemented, but if you'd want to make a PR, that would be appreciated! I can then check that it works with the ResidualDouble
strategy. This PR is adding another distribution, you could take it as a template: https://github.com/sktime/skpro/pull/421
Also, if you can describe the model that you would like to fit, I can also see whether ResidualDouble
needs to be extended, e.g., with parameter transformations.
I'm also a bit confused by the sklearn
Tweedie regressor.
How does one retrieve the two parameters from the fitted Tweedie distribution? Namely, mean and scale.
I opened an issue for interfacing the Tweedie regressor here: https://github.com/sktime/skpro/issues/423
I looked at it briefly, and do not know how to get the variance from it. Do you have an idea, @fsaforo1? If so, a reply on #423 would be appreciated!
For models with log-link like Tweedie, Poisson, etc., that are constrained to only make non-negative predictions, one would expect the intervals to be non-negative as well. Below is a reproducible example.