pred.tskeras {forecasteR} | R Documentation |
Time series forecasts for a keras model.
Description
Time series forecasts for a keras model.
Usage
pred.tskeras(object, h = 1)
Arguments
object |
An object from keras. |
h |
Number of periods for forecasting. |
Value
Point forecasts as a time series.
Author(s)
Diego Jimenez <diego.jimenez@promidat.com>
Examples
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)
[Package forecasteR version 2.0.2 Index]