Description Usage Arguments Examples
Recurrent neural network implementation for stream water temperature prediction including Bayesian hyperparameter optimization. All results are stored automatically in the folder catchment/model_name.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | wt_rnn(
train_data,
test_data = NULL,
type = "LSTM",
catchment = NULL,
model_name = NULL,
seed = NULL,
n_iter = 40,
n_random_initial_points = 20,
epochs = 100,
early_stopping_patience = 5,
ensemble_runs = 5,
bounds_layers = c(1, 5),
bounds_units = c(5, 300),
bounds_dropout = c(0, 0.4),
bounds_batch_size = c(5, 150),
bounds_timesteps = c(5, 200),
initial_grid_from_model_scores = TRUE
)
|
train_data |
Data frame containing training data created by using wt_preprocessing() |
test_data |
Data frame containing test data created by using wt_preprocessing() |
type |
RNN cell type to use. Can be either "LSTM" for the Long short-term model, or "GRU" for the Gated recurrent unit. |
catchment |
Catchment name as string, used for storing results in current working directory. |
model_name |
Name of this particular model run as string, used for storing results in the catchment folder. |
seed |
Random seed. |
n_iter |
Number of iteration steps for bayesian hyperparameter optimization. |
n_random_initial_points |
Number of sampled initial random points for bayesian hyperparameter optimization |
epochs |
integer. Number of training epochs |
early_stopping_patience |
Integer. Early stopping patience, i.e. the number of epochs with no improvement to waite before stopping the training |
ensemble_runs |
Number of ensembles used for making the finel model. |
bounds_layers |
Vector containing the lower and upper bound of the numbers of layers used in the bayesian hyperparameter optimization. |
bounds_units |
Vector containing the lower and upper bound of the numbers of units used in the bayesian hyperparameter optimization. |
bounds_dropout |
Vector containing the lower and upper bound of the numbers of dropout used in the bayesian hyperparameter optimization. |
bounds_batch_size |
Vector containing the lower and upper bound of the numbers of batch size used in the bayesian hyperparameter optimization. |
bounds_timesteps |
Vector containing the lower and upper bound of the numbers of timesteps used in the bayesian hyperparameter optimization. |
initial_grid_from_model_scores |
logical. Should previous results be used as initial grid for the hyperparameter optimization? These have to be stored in the model_name folder under model_scores.csv |
1 2 3 4 5 6 7 8 9 | ## Not run:
data(test_catchment)
wt_preprocess(test_catchment)
train_data <- feather::read_feather("test_catchment/train_data.feather")
test_data <- feather::read_feather("test_catchment/test_data.feather")
wt_rnn(train_data, test_data, "GRU", "test_catchment", "standard_rnn_gru")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.