Train MaxEnt directly from a terra SpatRaster
Source:R/featured_space_raster.R
maxent_train_terra.RdHigh-level convenience wrapper that builds a streaming FeaturedSpace from
rast, maps occurrence locations to finite-stream sample indices, and
trains with maxent_fit.
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
- rast
- occurrences
Either a two-column matrix/data.frame (x,y) or a vector of 1-based raster cell indices.
- lon_col
Longitude column name when
occurrencesis a data.frame.- lat_col
Latitude column name when
occurrencesis a data.frame.- feature_types
Feature type set passed to feature generation.
- n_thresholds
Number of threshold knots.
- n_hinges
Number of hinge knots.
- max_iter
Maximum training iterations.
- convergence
Convergence threshold.
- beta_multiplier
Regularization multiplier.
- min_deviation
Minimum deviation floor.