% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/torch_ts_mlp.R
\name{torch_ts_mlp}
\alias{torch_ts_mlp}
\title{PyTorch Time-Series MLP}
\usage{
torch_ts_mlp(
  preprocess = NA,
  input_size = NA,
  hidden_sizes = c(16L, 8L),
  dropout = 0,
  activation = c("relu", "leaky_relu", "elu", "gelu", "tanh"),
  output_activation = c("none", "relu", "sigmoid", "tanh", "softplus"),
  normalization = c("none", "batch", "layer"),
  init_method = c("default", "xavier_uniform", "xavier_normal", "kaiming_uniform",
    "kaiming_normal"),
  epochs = 100L,
  lr = 0.001,
  validation_strategy = c("static", "dynamic"),
  stopping_rule = c("none", "patience", "sma", "ema", "h"),
  val_ratio = 0.2,
  batch_size = 32L,
  patience = 100L,
  min_delta = 1e-04,
  sma_window = 5L,
  ema_alpha = 0.2,
  test_window = 30L,
  p_value = 0.05
)
}
\arguments{
\item{preprocess}{Optional preprocessing/normalization object.}

\item{input_size}{Integer. Number of lagged inputs per training example.}

\item{hidden_sizes}{Integer vector with hidden layer sizes.}

\item{dropout}{Numeric. Dropout rate.}

\item{activation}{Character. Hidden activation function. One of
\code{"relu"}, \code{"leaky_relu"}, \code{"elu"}, \code{"gelu"}, or \code{"tanh"}.}

\item{output_activation}{Character. Output activation of the regression head. One of
\code{"none"}, \code{"relu"}, \code{"sigmoid"}, \code{"tanh"}, or \code{"softplus"}.}

\item{normalization}{Character. Optional normalization after each hidden linear layer.
One of \code{"none"}, \code{"batch"}, or \code{"layer"}.}

\item{init_method}{Character. Weight initialization strategy. One of
\code{"default"}, \code{"xavier_uniform"}, \code{"xavier_normal"}, \code{"kaiming_uniform"}, or \code{"kaiming_normal"}.}

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

\item{lr}{Numeric. Optimizer learning rate.}

\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.}

\item{batch_size}{Integer. Mini-batch size.}

\item{patience}{Integer. Early stopping patience.}

\item{min_delta}{Numeric. Minimum improvement to reset early stopping.}

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

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

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

\item{p_value}{Numeric. Significance threshold used by \code{h}.}
}
\value{
A \code{torch_ts_mlp} object.
}
\description{
Time-series forecaster using a configurable feedforward PyTorch MLP with unified
training strategies and a Python backend.
}
\examples{
\dontrun{
library(daltoolboxdp)
model <- torch_ts_mlp(
  input_size = 12,
  hidden_sizes = c(32L, 16L),
  normalization = "batch",
  init_method = "kaiming_uniform",
  epochs = 100L
)
}
}
