Compute the deviance for the Tweedie family case.
BT_devTweedie(y, mu, tweedieVal, w = NULL)A vector of individual deviance contribution.
a vector containing the observed values.
a vector containing the fitted values.
a numeric representing the Tweedie Power. It has to be a positive number outside of the interval ]0,1[.
an optional vector of weights.
Gireg Willame gireg.willame@gmail.com
This package is inspired by the gbm3 package. For more details, see https://github.com/gbm-developers/gbm3/.
This function computes the Tweedie related deviance. The latter is defined as:
$$d(y, mu, w) = w (y-mu)^2, if tweedieVal = 0;$$ $$d(y, mu, w) = 2 w (y log(y/mu) + mu - y), if tweedieVal = 1;$$ $$d(y, mu, w) = 2 w (log(mu/y) + y/mu - 1), if tweedieVal = 2;$$ $$d(y, mu, w) = 2 w (max(y,0)^(2-p)/((1-p)(2-p)) - y mu^(1-p)/(1-p) + mu^(2-p)/(2-p)), else.$$
M. Denuit, D. Hainaut and J. Trufin (2019). Effective Statistical Learning Methods for Actuaries |: GLMs and Extensions, Springer Actuarial.
M. Denuit, D. Hainaut and J. Trufin (2019). Effective Statistical Learning Methods for Actuaries ||: Tree-Based Methods and Extensions, Springer Actuarial.
M. Denuit, D. Hainaut and J. Trufin (2019). Effective Statistical Learning Methods for Actuaries |||: Neural Networks and Extensions, Springer Actuarial.
M. Denuit, D. Hainaut and J. Trufin (2022). Response versus gradient boosting trees, GLMs and neural networks under Tweedie loss and log-link. Accepted for publication in Scandinavian Actuarial Journal.
M. Denuit, J. Huyghe and J. Trufin (2022). Boosting cost-complexity pruned trees on Tweedie responses: The ABT machine for insurance ratemaking. Paper submitted for publication.
M. Denuit, J. Trufin and T. Verdebout (2022). Boosting on the responses with Tweedie loss functions. Paper submitted for publication.
BT, BT_call.