View source: R/mod_deeplearning_utils.R
pred.tskeras | R Documentation |
Time series forecasts for a keras model.
pred.tskeras(object, h = 1)
object |
An object from keras. |
h |
Number of periods for forecasting. |
Point forecasts as a time series.
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')
modelo.deep <- tskeras(AirPassengers, modelo.deep, lag = 12, epochs = 1)
pred.tskeras(modelo.deep, h = 12)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.