tune_keras_rnn_bayesoptim: Automatic cross-validated tuning of recurrent neural networks...

Description Usage Arguments Value Tuning Bounds See Also Examples

View source: R/tune_keras_rnn_bayesoptim.R

Description

Tune recurrent neural network with Keras functional API and Bayes Optimization to select best performing model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
tune_keras_rnn_bayesoptim(
  data,
  model_type,
  cv_setting,
  tuning_bounds = list(),
  col_id = NULL,
  col_date = "index",
  col_value = "value",
  save = NULL,
  save_id = NULL
)

Arguments

data

Univariate time series (data.frame) with date and value column, specified in col_date and col_value

model_type

One of "simple", "gru" or "lstm"

cv_setting

list of "periods_train", "periods_val", "periods_test" and "skip_span" for rolling_origin

tuning_bounds

list of tuning parameters - see section "Tuning Bounds"

col_id

Optional ID column in data, default to "ticker"

col_date

Date column in data, default to "index"

col_value

Value column in data, default to "value"

save

Automatically save tuning results? Specify NULL if not or character vector with path to directory for yes

save_id

optional character id for model filename

Value

list of Bayes Optimization results per split

Tuning Bounds

The following parameters are (currently) available for tuning.

See Also

Other RNN tuning with Keras: tune_keras_rnn_eval(), tune_keras_rnn_predict()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
apple <- tsRNN::DT_apple

cv_setting <- list(
  periods_train = 90,
  periods_val = 10,
  periods_test = 10,
  skip_span = 5
)

bayes <- tune_keras_rnn_bayesoptim(apple, model_type = "simple", cv_setting)
bayes

## End(Not run)

thfuchs/fcf documentation built on April 18, 2021, 1:43 p.m.