tsbacktest.tsvets.spec | R Documentation |
Generates an expanding window walk forward backtest.
## S3 method for class 'tsvets.spec' tsbacktest( object, start = floor(NROW(object$target$y_orig)/2), end = NROW(object$target$y_orig), h = 1, alpha = NULL, aggregate = FALSE, weights = NULL, solver = "nlminb", trace = FALSE, autodiff = FALSE, ... )
object |
an object of class “tsvets.spec”. |
start |
numeric data index from which to start the backtest. |
end |
numeric data index on which to end the backtest. The backtest will end 1 period before that date in order to have at least 1 out of sample value to compare against. |
h |
forecast horizon. As the expanding window approaches the “end”, the horizon will automatically shrink to the number of available out of sample periods. |
alpha |
optional numeric vector of coverage rates for which to calculate the quantiles. |
aggregate |
whether to create an aggregate series from the forecasts
(see |
weights |
numeric weights vector for the aggregation. |
solver |
solver to use. |
trace |
whether to show the progress bar. The user is expected to have set up appropriate handlers for this using the “progressr” package. |
autodiff |
whether to use automatic differentiation for estimation. This makes use of the tsvetsad package. |
... |
additional arguments passed to the “auto_clean” function. |
A list with the following data.tables:
prediction : the backtest table with forecasts and actuals by series
metrics: a summary performance table showing metrics by forecast horizon and series
The function can use parallel functionality as long as the user has
set up a plan
using the future package.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.