.fit.boost {tidyfit} | R Documentation |
Gradient boosting regression for tidyfit
Description
Fits a gradient boosting regression or classification on a 'tidyFit' R6
class. The function can be used with regress
and classify
.
Usage
## S3 method for class 'boost'
.fit(self, data = NULL)
Arguments
self |
a 'tidyFit' R6 class. |
data |
a data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). |
Details
Hyperparameters:
-
mstop
(number of boosting iterations) -
nu
(step size)
Important method arguments (passed to m
)
The gradient boosting regression is performed using mboost::glmboost
. See ?glmboost
for more details.
Implementation
Features are standardized by default with coefficients transformed to the original scale.
If no hyperparameter grid is passed (is.null(control$mstop)
and is.null(control$nu)
), the default grid is used with mstop = c(100, 500, 1000, 5000)
and nu = c(0.01, 0.05, 0.1, 0.15, 0.2, 0.25)
.
Value
A fitted 'tidyFit' class model.
A 'tibble'.
Author(s)
Johann Pfitzinger
References
T. Hothorn, P. Buehlmann, T. Kneib, M. Schmid, and B. Hofner (2022). mboost: Model-Based Boosting, R package version 2.9-7,https://CRAN.R-project.org/package=mboost.
See Also
m
method
Examples
# Load data
data <- tidyfit::Factor_Industry_Returns
# Stand-alone function
fit <- m("boost", Return ~ ., data, nu = 0.1, mstop = 100)
fit
# Within 'regress' function
fit <- regress(data, Return ~ ., m("boost", nu = c(0.1, 0.05), mstop = 100),
.mask = c("Date", "Industry"))
coef(fit)