A family of probability distributions, which is a special case of exponential dispersion models.
Questions tagged [tweedie]
41 questions
8
votes
0 answers
Xgboost tweedie: Why is the formula to get the prediction from the link = exp(link)/ 2?
When I run a Tweedie GLM, one can get the prediction from the link by doing exp(link). To get the prediction for a Tweedie GLM, I get the prediction from the link by doing exp(link)/2. I don't understand why I need to divide by 2.
Minimal…

Zoltan
- 760
- 4
- 15
6
votes
1 answer
No access to "ldTweedie" function from mgcv when called from within another package
I am using mgcv package within my own package and so far everything worked nicely. However, I tried to introduce Tweedie family objects ("Tweedie()", "tw()") to my package, but I am getting an error when trying to use the latter.
The function is as…

Daniel Piacek
- 71
- 4
5
votes
1 answer
LightGBM with Tweedie loss; I'm confused on the Gradient and Hessians used
I'm trying to figure out custom objective functions in LightGBM, and I figured a good place to start would be replicating the built-in functions. The equation LightGBM uses to calculate the Tweedie metric…

Sinnombre
- 346
- 1
- 7
4
votes
1 answer
Transform SHAP values from raw to native units with lightgbm Tweedie objective?
The utility of Shapley Additive Explanations (SHAP values) is to understand how each feature contributes to a model's prediction. For some objectives, such as regression with RMSE as an objective function, SHAP values are in the native units of the…

kdoherty
- 53
- 7
4
votes
0 answers
Changing stepAIC to accommodate tweedie distributions
So I am trying to do a stepwise regression for a tweedie distribution. However, AIC is returned as NA by glm() if the family is tweedie, and this breaks the stepAIC command. I tried editting the code of the command to change extractAIC to…

J. Gursky
- 121
- 1
- 9
4
votes
1 answer
Finite mixture of tweedie
I'm trying to estimate a finite mixture of tweedie (or compound Poisson-gamma) distributions. I have scoured any resources I can think of, without finding any resources on how to do this.
I am currently trying to use the flexmix package in R writing…

masher
- 41
- 2
3
votes
1 answer
using xgboost to model a Tweedie regression
I'm trying to use xgboost to make a tweedie model, however I get an obscure error message.
Here is a reproducible example:
Preparing the data:
library(xgboost)
library(dplyr)
set.seed(123)
xx <- rpois(5000, 0.02)
xx[xx>0] <- rgamma(sum(xx>0),…

Bastien
- 3,007
- 20
- 38
3
votes
1 answer
GLM with Apache Spark 2.2.0 - Tweedie family default Link value
I am using spark 2.2.0 with python. I tried to figure out what is the default param of Link function Spark accepts in the GeneralizedLineraModel in case of Tweedie family.
When I look to documentation…

Antoine Ly
- 33
- 1
- 7
2
votes
0 answers
TweedieLoss in Pytorch Forecasting Model
I am currently implementing a demand forecasting solution using Deep Learning in Pytorch with multihorizon output, and I am experimenting with Pytorch forecasting (PTF) models (N-Beats, N-hits, DeepAR, etc), using TimeSeriesDataset and DataLoader…

George Gousios
- 56
- 5
2
votes
1 answer
Mean Residual Deviance Formula in H2O
I'm trying to find out the exact formula used in H2O for the Mean Residual Deviance loss function for a Tweedie distribution.
Or even, in general, what would be the mean residual deviance for a Tweedie distributed dependent variable?
So far, I've…

vosirus
- 113
- 1
- 6
2
votes
1 answer
Parameters of ligthgbm tweedie
I'm using the tweedie option for the objective parameter of the lightgbm package.
According to wikipedia, the tweedie distribution has a free parameter p, but I can't seem to find the way to give it a value.
Does anyone know how to do it? What is…

Jaime o.
- 21
- 3
2
votes
1 answer
Lightgbm with Tweedie
I'm trying to run lightgbm with a Tweedie distribution. I believe this code should be sufficient to see the…

Simon Todd
- 156
- 1
- 10
2
votes
1 answer
model selection with tweedie distributions in MuMIn package R
I'm trying to do AICc model selection and model averaging with tweedie (compound Poisson) distributed data in R.
I was working with the AICcmodavg R package with no success, then decided to try out the MuMIn package when I came across the…

RachelF
- 21
- 2
2
votes
1 answer
mgcv: How to do stepwise regression with a Tweedie response model?
Does anyone have an idea how to do stepwise regression with Tweedie in R?
I found the mgcv package, which apparently treats the power parameter of Tweedie as yet another parameter to be estimated. This seems to improve on having to use…

Alp Can
- 33
- 1
- 6
2
votes
1 answer
Package dglm in R
I am trying to fit a double glm in R using the dglm package. This is used in combination with the statmod package to use the tweedie model. A reproduction of the problem is:
library(dglm)
library(statmod)
p <- 1.5
y <- runif(10)
x <-…

Acarbalacar
- 714
- 2
- 7
- 19