% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/featured_space_raster.R
\name{maxent_train_terra}
\alias{maxent_train_terra}
\title{Train MaxEnt directly from a terra SpatRaster}
\usage{
maxent_train_terra(
  rast,
  occurrences,
  lon_col = "longitude",
  lat_col = "latitude",
  feature_types = c("linear", "quadratic", "product", "threshold", "hinge"),
  n_thresholds = 10L,
  n_hinges = 10L,
  max_iter = 500L,
  convergence = 1e-05,
  beta_multiplier = 1,
  min_deviation = 0.001
)
}
\arguments{
\item{rast}{A \code{terra::SpatRaster}.}

\item{occurrences}{Either a two-column matrix/data.frame (x,y) or a vector
of 1-based raster cell indices.}

\item{lon_col}{Longitude column name when \code{occurrences} is a data.frame.}

\item{lat_col}{Latitude column name when \code{occurrences} is a data.frame.}

\item{feature_types}{Feature type set passed to feature generation.}

\item{n_thresholds}{Number of threshold knots.}

\item{n_hinges}{Number of hinge knots.}

\item{max_iter}{Maximum training iterations.}

\item{convergence}{Convergence threshold.}

\item{beta_multiplier}{Regularization multiplier.}

\item{min_deviation}{Minimum deviation floor.}
}
\value{
A named list with training results plus \code{model} and
  \code{sample_indices}.
}
\description{
High-level convenience wrapper that builds a streaming FeaturedSpace from
\code{rast}, maps occurrence locations to finite-stream sample indices, and
trains with \code{\link{maxent_fit}}.
}
