BT_devTweedie {BT} | R Documentation |
Deviance function for the Tweedie family.
Description
Compute the deviance for the Tweedie family case.
Usage
BT_devTweedie(y, mu, tweedieVal, w = NULL)
Arguments
y |
a vector containing the observed values. |
mu |
a vector containing the fitted values. |
tweedieVal |
a numeric representing the Tweedie Power. It has to be a positive number outside of the interval ]0,1[. |
w |
an optional vector of weights. |
Details
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.
Value
A vector of individual deviance contribution.
Author(s)
Gireg Willame gireg.willame@gmail.com
This package is inspired by the gbm3
package. For more details, see https://github.com/gbm-developers/gbm3/.
References
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.