retrain_all.qreg_lightgbm: Method for repeated model retraining throughout the Test set,...

View source: R/MQR_lightgbm.R

retrain_all.qreg_lightgbmR Documentation

Method for repeated model retraining throughout the Test set, based on Multiple Quantile Regression from lightgbm Gradient Boosted Decision Trees.

Description

This function returns updated fitted qreg_lightgbm models and predictions, which are the supplied previously fitted models updated throughout the Test set. S3 Method for qreg_lightgbm objects

Usage

## S3 method for class 'qreg_lightgbm'
retrain_all(
  object,
  data,
  retrain_daily_frequency,
  issue_datetime_column,
  cv_folds,
  pckgs = NULL,
  cores = 1,
  ...
)

Arguments

object

fitted model of class qreg_lightgbm obtained from the function qreg_lightgbm().

data

data.frame of model inputs and observations, including a column containing fold labels: models will be retrained throughout the subset of the data labelled 'Test'.

retrain_daily_frequency

Frequency, in number of days, which the model will be retrained over the Test set.

issue_datetime_column

Name of the column in data containing the forecast issue times. Column of issue times must be POSIXct or Date.

cv_folds

Name of column in data containing the fold labels. Models will only be retrained for time points beyond the start of the Test fold.

pckgs

specify additional packages required for each worker (e.g. c("data.table") if data stored as such).

cores

the number of available cores. Defaults to one, i.e. no parallelisation, although in this case the user must still specify pckgs if applicable.

...

additional arguments; not currently used.

Details

this function periodically retrains the fitted lightgbm model over the Test set and updates the predictions. NOTE predictions saved within the lightgbm object are not updated within this function.

Value

a named list containing fitted models as a list of qreg_lightgbm objects.

Author(s)

Gordon McFadzean, gordon.mcfadzean@tneigroup.com; Rosemary Tawn, rosemary.tawn@tneigroup.com


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