Learn R Programming

daltoolboxdp (version 1.2.737)

autoenc_lstm_e: LSTM Autoencoder - Encode

Description

Creates a deep learning LSTM-based autoencoder to encode sequences of observations. Wraps a PyTorch implementation.

Usage

autoenc_lstm_e(
  input_size,
  encoding_size,
  batch_size = 32,
  num_epochs = 50,
  learning_rate = 0.001
)

Value

A autoenc_lstm_e object.

Arguments

input_size

input size

encoding_size

encoding size

batch_size

size for batch learning

num_epochs

number of epochs for training

learning_rate

learning rate

References

Hochreiter, S., & Schmidhuber, J. (1997). Long Short-Term Memory.

Examples

Run this code
if (FALSE) {
# LSTM-based encoder over sequences stored as rows
X <- matrix(rnorm(1000), nrow = 50, ncol = 20)
ae <- autoenc_lstm_e(input_size = 20, encoding_size = 5, num_epochs = 50)
ae <- daltoolbox::fit(ae, X)
Z  <- daltoolbox::transform(ae, X)  # 50 x 5
dim(Z)
}

# See:
# https://github.com/cefet-rj-dal/daltoolbox/blob/main/autoencoder/autoenc_lstm_e.md

Run the code above in your browser using DataLab