View source: R/mod_deeplearning_utils.R
tskeras | R Documentation |
keras model for time series.
tskeras(x, model, lag = 1, batch_size = 1, epochs = 20, verbose = 0)
x |
a ts object. |
model |
a keras model. |
lag |
indicates by value to test alpha, beta and gamma. |
batch_size |
indicates by value to test alpha, beta and gamma. |
epochs |
indicates by value to test alpha, beta and gamma. |
verbose |
indicates by value to test alpha, beta and gamma. |
keras model
Diego Jimenez <diego.jimenez@promidat.com>
library(keras)
modelo.deep <- keras_model_sequential() %>%
layer_lstm(
units = 10, activation = 'tanh', batch_input_shape = c(1, 12, 1),
return_sequences = TRUE, stateful = TRUE) %>%
layer_dense(units = 1) %>%
compile(loss = 'mse', optimizer = 'adam', metrics = 'mse')
tskeras(AirPassengers, modelo.deep, lag = 12, epochs = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.