% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/autoenc_lstm_e.R
\name{autoenc_lstm_e}
\alias{autoenc_lstm_e}
\title{LSTM Autoencoder - Encode}
\usage{
autoenc_lstm_e(
  input_size,
  encoding_size,
  lstm_hidden_size = NULL,
  sequence_length = 1L,
  num_layers = 1L,
  dropout = 0,
  batch_size = 32,
  epochs = 100L,
  num_epochs = NULL,
  learning_rate = 0.001,
  validation_strategy = c("static", "dynamic"),
  stopping_rule = c("none", "patience", "sma", "ema", "h"),
  val_ratio = 0.3,
  patience = 100L,
  min_delta = 1e-04,
  sma_window = 5L,
  ema_alpha = 0.2,
  test_window = 30L,
  p_value = 0.05
)
}
\arguments{
\item{input_size}{Integer. Number of input features per observation.}

\item{encoding_size}{Integer. Size of the latent (bottleneck) representation.}

\item{lstm_hidden_size}{Optional integer. Hidden size used inside the encoder/decoder LSTMs.
If \code{NULL}, it defaults to \code{encoding_size}.}

\item{sequence_length}{Integer. Number of time steps represented by each row. \code{input_size}
must be divisible by \code{sequence_length}. Default is \code{1L}, which preserves the previous behavior.}

\item{num_layers}{Integer. Number of recurrent LSTM layers.}

\item{dropout}{Numeric. Recurrent dropout applied between LSTM layers when \code{num_layers > 1}.}

\item{batch_size}{Integer. Mini-batch size used during training. Default is 32.}

\item{epochs}{Integer. Maximum number of training epochs. Default is 100.}

\item{num_epochs}{Deprecated compatibility alias for \code{epochs}. If informed, it overrides \code{epochs}.}

\item{learning_rate}{Numeric. Optimizer learning rate. Default is 0.001.}

\item{validation_strategy}{Character. One of \code{static} or \code{dynamic}.}

\item{stopping_rule}{Character. One of \code{none}, \code{patience}, \code{sma}, \code{ema}, or \code{h}.}

\item{val_ratio}{Numeric. Validation fraction used when validation is enabled. Default is 0.3.}

\item{patience}{Integer. Early stopping patience. Default is 100.}

\item{min_delta}{Numeric. Minimum improvement to reset early stopping. Default is 1e-4.}

\item{sma_window}{Integer. Window size used by \code{sma}. Default is 5.}

\item{ema_alpha}{Numeric. Smoothing factor used by \code{ema}. Default is 0.2.}

\item{test_window}{Integer. Window size used by \code{h}. Default is 30.}

\item{p_value}{Numeric. Significance threshold used by \code{h}. Default is 0.05.}
}
\value{
A \code{autoenc_lstm_e} object.
}
\description{
Creates an LSTM-based autoencoder with configurable recurrent depth
and latent projection through a Python/PyTorch backend.
}
\details{
\code{encoding_size} remains the latent bottleneck exposed to the user. The recurrent
body can now use a different \code{lstm_hidden_size}, multiple layers, dropout between
recurrent layers, and a configurable \code{sequence_length} to reshape each row into
a sequence before encoding.
}
\examples{
\dontrun{
X <- matrix(rnorm(1000), nrow = 50, ncol = 20)
ae <- autoenc_lstm_e(
  input_size = 20,
  encoding_size = 5,
  lstm_hidden_size = 16,
  sequence_length = 4,
  num_layers = 2,
  dropout = 0.1
)
ae <- daltoolbox::fit(ae, X)
Z <- daltoolbox::transform(ae, X)
dim(Z)
}

}
\references{
Hochreiter, S., & Schmidhuber, J. (1997). Long Short-Term Memory.
}
