% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/eval.R
\name{GradientDescent}
\alias{GradientDescent}
\title{Gradient descent estimation of model parameters}
\usage{
GradientDescent(data, maxit)
}
\arguments{
\item{data}{Numeric matrix (typically 0/1). Rows are samples and columns are species or taxa.}

\item{maxit}{Integer. Maximum number of gradient descent iterations.}
}
\value{
A list with elements:
\describe{
  \item{h.est}{Numeric vector of estimated implicit environmental parameters.}
  \item{j.est}{Numeric matrix of estimated interaction matrix.}
}
}
\description{
Estimates parameters \code{h} and \code{J} by iterative gradient updates to match
first and second moments of the observed binary data under an maximum
pairwise entropy model.
}
\details{
This function calls \code{Energy()} to compute energies for candidate states.
Ensure that \code{Energy} is available in the package namespace.
}
