% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/runSA.R
\name{bootstrap_SA}
\alias{bootstrap_SA}
\title{Parameter fitting with bootstrap sampling of datasets}
\usage{
bootstrap_SA(
  ocmat,
  enmat = NULL,
  bootstrap.it = 2000,
  rep = 128,
  threads = 1,
  we = 0.001,
  totalit = 1000,
  lambda = 0.01,
  runadamW = TRUE,
  maxlr = 0.005,
  sparse = TRUE,
  reporting = TRUE
)
}
\arguments{
\item{ocmat}{Numeric matrix (0/1). Rows are samples and columns are species.}

\item{enmat}{Optional numeric matrix. Environmental variables for each sample.
Should be normalized/standardized beforehand.}

\item{bootstrap.it}{number of bootstrap trials (default: 1000).}

\item{rep}{Integer. Number of parallel runs (replicates) for optimization.}

\item{threads}{Integer. Number of cores used when running in parallel.}

\item{we}{Numeric. Weight decay parameter for AdamW.}

\item{totalit}{Integer. Total number of optimization iterations.}

\item{lambda}{Numeric. Sparsity penalty parameter (used when \code{sparse = TRUE}).}

\item{runadamW}{Logical. If \code{TRUE}, use AdamW-style optimization.}

\item{maxlr}{Numeric. Maximum learning rate.}

\item{sparse}{Logical. If \code{TRUE}, apply sparsity constraint.}

\item{reporting}{Logical. If \code{TRUE}, print progress messages.}
}
\value{
a list of SA parameters estimated with bootstrap resampling (length \code{bootstrap.it}).
}
\description{
Perform \link{runSA} algorithm and estimate parameters using bootstrap resampled
data set (\code{ocmat} and \code{enmat}). 
The basic configuration is same as \link{runSA}.
}
