predict.qreg_gbm: Predict method for Multiple Quantile Regression from Gradient...

View source: R/MQR_gbm.R

predict.qreg_gbmR Documentation

Predict method for Multiple Quantile Regression from Gradient Boosted Decision Trees.

Description

This function returns multiple quantile predictions as an object of class MultiQR based on a ProbCast gbm fitted model. S3 Method for for qreg_gbm objects

Usage

## S3 method for class 'qreg_gbm'
predict(
  object,
  newdata = NULL,
  quantiles = NULL,
  model_name = NULL,
  pred_ntree = NULL,
  perf.plot = FALSE,
  sort = T,
  sort_limits = NULL,
  ...
)

Arguments

object

object of class qreg_gbm obtained from the function qreg_gbm().

newdata

data.frame of observations for which to make predictions

quantiles

the quantiles to predict. Default is all the quantiles present in object

model_name

the name of the model to be used for prediction. Unless specified, object$default_model is used.

pred_ntree

predict using a user-specified tree. If NULL gbm::gbm.perf() is used to estimate the best tree via out-of-the-bag estimates, unless internal gbm cross-validation folds are specified via the ... argument in qreg_gbm().

perf.plot

plot GBM performance if pred_ntree = NULL?

sort

sort quantiles using SortQuantiles()?

sort_limits

Limits argument to be passed to SortQuantiles(). Constrains quantiles to upper and lower limits given by list(U=upperlim,L=lowerlim).

...

additional arguments; not currently used.

Details

this function returns predictive quantiles for each row in newdata, the result is returned as a MultiQR object

Value

Quantile forecasts in a MultiQR object.

Author(s)

Ciaran Gilbert, ciaran.gilbert@strath.ac.uk


jbrowell/ProbCast documentation built on July 20, 2024, 1:53 p.m.