.fit.boost | R Documentation |
tidyfit
Fits a gradient boosting regression or classification on a 'tidyFit' R6
class. The function can be used with regress
and classify
.
## S3 method for class 'boost'
.fit(self, data = NULL)
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). |
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)
.
A fitted 'tidyFit' class model.
A 'tibble'.
Johann Pfitzinger
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.
m
method
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.