tskeras {forecasteR} | R Documentation |
keras model for time series.
Description
keras model for time series.
Usage
tskeras(x, model, lag = 1, batch_size = 1, epochs = 20, verbose = 0)
Arguments
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. |
Value
keras model
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')
tskeras(AirPassengers, modelo.deep, lag = 12, epochs = 1)
[Package forecasteR version 2.0.2 Index]