This learner supports long short-term memory (LSTM) recurrent neural network algorithm. This learner uses the kerasR package, and in order to use it, you will need keras Python module 2.0.0 or higher. Note that all preprocessing, such as differencing and seasonal effects for time series, should be addressed before using this learner.

Format

R6Class object.

Value

Lrnr_base object with methods for training and prediction

Fields

units

Positive integer, dimensionality of the output space.

loss

Name of a loss function used.

optimizer

name of optimizer, or optimizer object.

batch_size

Number of samples per gradient update.

epochs

Number of epochs to train the model.

window

Size of the sliding window input.

activation

The activation function to use.

dense

regular, densely-connected NN layer. Default is 1.

dropout

float between 0 and 1. Fraction of the input units to drop.

early_stopping

logical indicating whether ot not to interrupt training when the validation loss is not decreasing anymore.

patience

number of epochs with no improvement after which training will be stopped, only used when early_stopping = TRUE.

validation_split

float between 0 and 1. Fraction of the data to use as held-out validation data, only used when early_stopping = TRUE.

See also