predict.BTFit {BT} | R Documentation |

## Predict method for BT Model fits.

### Description

Predicted values based on a boosting tree model object.

### Usage

```
## S3 method for class 'BTFit'
predict(object, newdata, n.iter, type = "link", single.iter = FALSE, ...)
```

### Arguments

`object` |
a |

`newdata` |
data frame of observations for which to make predictions. If missing or not a data frame, if |

`n.iter` |
number of boosting iterations used for the prediction. This parameter can be a vector in which case predictions are returned for each iteration specified. |

`type` |
the scale on which the BT makes the predictions. Can either be "link" or "response". Note that, by construction, a log-link function is used during the fit. |

`single.iter` |
if |

`...` |
not currently used. |

### Details

`predict.BTFit`

produces a predicted values for each observation in `newdata`

using the first `n.iter`

boosting iterations.
If `n.iter`

is a vector then the result is a matrix with each column corresponding to the `BT`

predictions with `n.iter[1]`

boosting iterations, `n.iter[2]`

boosting
iterations, and so on.

As for the fit, the predictions do not include any offset term. In the Poisson case, please remind that a weighted approach is initially favored.

### Value

Returns a vector of predictions. By default, the predictions are on the score scale.
If `type = "response"`

, then `BT`

converts back to the same scale as the outcome. Note that, a log-link is supposed by construction.

### 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.

### See Also

*BT*version 0.4 Index]