% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/optimizer.R
\name{adamW}
\alias{adamW}
\title{AdamW SGD optimization}
\usage{
adamW(
  stepsize = 0.05,
  beta1 = 0.9,
  beta2 = 0.999,
  lambda = 0.01,
  epsilon = 1e-08
)
}
\arguments{
\item{stepsize}{stepsize for SGD}

\item{beta1}{beta1 for AdamW}

\item{beta2}{beta2 for AdamW}

\item{lambda}{lambda (weight decay) for AdamW}

\item{epsilon}{epsilon for numerical stability}
}
\value{
a list of control variables for optimization
(used in \code{control_opt} function)
}
\description{
AdamW SGD optimization
}
\details{
The update rule for AdamW is:
\deqn{m_t = \beta_1 m_{t-1} + (1 - \beta_1) g_t}
\deqn{v_t = \beta_2 v_{t-1} + (1 - \beta_2) g_t^2}
\deqn{\hat{m_t} = m_t / (1 - \beta_1^t)}
\deqn{\hat{v_t} = v_t / (1 - \beta_2^t)}
\deqn{x_{t+1} = x_t - \text{stepsize} * \left( \lambda x_t + \frac{\hat{m_t}}{\sqrt{\hat{v_t}} + \epsilon} \right)}
}
