View source: R/MQR_qreg_mboost.R
qreg_mboost | R Documentation |
mboost
This function fits multiple quantile regression models using mboost
, with
facilities for cross-validation. mboost
accommodates both generalised
additive models, decision trees and other learners. See ?mboost
for more
details.
qreg_mboost(
data,
formula,
quantiles = c(0.25, 0.5, 0.75),
cv_folds = NULL,
w = rep(1, nrow(data)),
cores = 1,
pckgs = NULL,
sort = T,
sort_limits = NULL,
save_models_path = NULL,
only_mqr = FALSE,
exclude_train = NULL,
...
)
data |
A |
quantiles |
The quantiles to fit models for. |
cv_folds |
Control for cross-validation with various options, either:
|
w |
an optional numeric vector of weights to be used in the fitting process. |
cores |
the number of available cores. Defaults to one, i.e. no parallelisation, although in
this case the user must still specify |
pckgs |
specify additional packages required for each worker (e.g. c("data.table") if data stored as such). |
sort |
Sort quantiles using |
sort_limits |
|
save_models_path |
Path to save models. Model details and file extension pasted onto this string.
Defaults to |
only_mqr |
return only the out-of-sample predictions? |
exclude_train |
control for exclusion of rows in data for the model training only, with various options, either:
This option is useful when out-of-sample predictions are required in rows which need excluded during model training |
... |
extra hyper-parameters to be passed to |
formaula |
A |
The returned predictive quantiles are those produced out-of-sample for each cross-validation fold (using models trained on the remaining folds but not "Test" data). Predictive quantiles corresponding to "Test" data are produced using models trained on all non-test data.
The returned models are in a named list corresponding to the model for each fold and
and can be extracted for further prediction or evaluation. See predict.qreg_mboost()
.
by default a named list containing fitted models as a list of qreg_mboost
objects,
and out-of-sample cross validation forecasts as an MultiQR
object. The output list depends on cv_folds
.
Alternatively returns only the out-of-sample cross validation forecasts as an MultiQR
object when only_mqr
is TRUE
Jethro Browell, jethro.browell@strath.ac.uk; Ciaran Gilbert, ciaran.gilbert@strath.ac.uk
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.