Convenient functions for ensemble forecasts in R combining
approaches from the 'forecast' package. Forecasts generated from auto.arima(), ets(),
thetaf(), nnetar(), stlm(), tbats(), and snaive() can be combined with equal weights, weights
based on in-sample errors (introduced by Bates & Granger (1969)
hybridModel(). This can be controlled by setting
parallel = TRUEand setting
num.cores. By default this is not enabled since the performance improvement typically only occurs when fitting
tbatsmodels on long series with large frequency (e.g.
snaive()models now respect and use
lambdawhen passed in
snaivemodel are now handled correctly.
[email protected]and hosted on both GitHub and GitLab in
forecast.hybridModel(). The default behavior is to follow the existing methodology of using the most extreme prediction intervals from the component models. When
"mean"is passed instead, a simple (unweighted) average of the component prediction intervals is used instead.
snaive()model to the ensemble. It is disabled by default, but can be added with "z".
FCFUNargument: custom forecasting functions should now return a S3 "forecast" object with the point forecast in
$mean, and the
tsproperties should be properly set.
cvts()now defaults to 2 cores
cvts()to the vignette.
cvts()introduced in version 1.0.8 when a custom
FCFUNis used that requires packages other than "forecast" or "forecastHybrid".
thetam()function now checks for an input time series with less length than the seasonality. Similarly,
hybridModel()detects this behavior. Thanks to Nicholas Fong for the bugfix.
cvts()usage example in documentation for "GMDH".
forecast.hybridModel()when for models where
xregwas not supplied to all of arima/nnetar models
tsobjects created with the "timekt" package can now be used in
forecastpackages are now imported instead of loading their entire namespaces.
cvts()now supports parallel fitting through the
num.coresargument. Note that if the model that you are fitting also utilizes parallelization, the number of cores used by each model multiplied by
cvts()should not exceed the number of cores on your machine.
ggplot2namespace, only specific functions are now imported.
accuracy(), so this is imported and no longer declared in "forecastHybrid".
rolling = TRUEwhereby the incorrect number of periods were calulated. Thanks to Ganesh Krishnan for the bugfix.
cvts()function now allows additional arguments to be passed with
.... Thanks to Ganesh Krishnan.
...arguments can be passed to the individual component models in
forecast()function from the "forecast" package when multiple or single prediction intervals are passed has changed. The prediction inervals are now consistently returned as matrices. This change fixes a bug in
forecast.hybridModel()when multiple prediction intervals are used.
stlmcomponent models when the
levelargument was set to a single value instead of a vector of values.
nnetarobjects in the ensemble. This should address one aspect of incorrect prediction intervals (e.g. issue #37).
f" in the
models =argument for
hybridModel()) and are indeed part of the default - so by default, hybridModel() will now fit six models
accuracy.cvts()is now exported
ggplot2graphics when the argument
ggplot = TRUEis passed.
weights = "cv.errors"in
weights = "insample.errors"and one or more component models perfectly fit the time series
xregis included in
nnetarmodel is not included in the model list
print.hybridModel()to three digits for cleaner display
verboseargument and enable by default in
hybridModel()to display fitting/cross validation progress
weights = "cv.errors"
2 * frequency(y) >= length(y)
not()function from "testthat" package
2 * frequency(y) >= length(y),
weights = "cv.errors")