Description Usage Arguments Value See Also Examples
View source: R/tune_keras_rnn_eval.R
Evaluate (tuned) recurrent neural networks per cross-validation split/sample for time series data
1 2 3 4 5 6 7 8 9 10 11 | tune_keras_rnn_eval(
fc_sample,
cv_setting,
bayes_best_par,
col_id = NULL,
col_date = "index",
col_value = "value",
h = NULL,
frequency = 4,
level = 95
)
|
fc_sample |
forecasts per |
cv_setting |
list of "periods_train", "periods_val", "periods_test" and "skip_span" for rolling_origin |
bayes_best_par |
tuned hyperparameters, from |
col_id |
Optional ID column in |
col_date |
Date column in |
col_value |
Value column in |
h |
NULL if forecast horizon equals cv_setting$n_test, else named list of forecast horizons for accuracy measures |
frequency |
time series frequency, e.g. 4 for quarters and 12 for months |
level |
level for prediction interval in percentage |
list of time series accuracy measures (MAPE, sMAPE, MASE, sMIS, ACD)
optionally for different forecast horizons (if h
specified)
Other RNN tuning with Keras:
tune_keras_rnn_bayesoptim()
,
tune_keras_rnn_predict()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | result_predict <- readRDS(system.file(
"tinytest_data/test_tune_keras_rnn_predict_simple.rds", package = "tsRNN"
))
cv_setting <- list(
periods_train = 90,
periods_val = 10,
periods_test = 10,
skip_span = 5
)
bayes_best_par <- purrr::map(
readRDS(system.file("tinytest_data/apple_bayesoptim.rds", package = "tsRNN")),
"Best_Par"
)
# Result
tune_keras_rnn_eval(
fc_sample = result_predict,
cv_setting = cv_setting,
bayes_best_par = bayes_best_par
)
# Specify multiple forecast horizons
tune_keras_rnn_eval(
fc_sample = result_predict,
cv_setting = cv_setting,
bayes_best_par = bayes_best_par,
h = list(short = 1:2, long = 3:6)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.