Skip to contents

Automatically generates all configured feature types from one or more environmental variable vectors. Categorical variables are expanded into binary indicator features (one per distinct level) instead of continuous feature types.

Usage

maxent_generate_features(
  data,
  types = c("linear", "quadratic", "product", "threshold", "hinge"),
  n_thresholds = 10L,
  n_hinges = 10L,
  categorical = NULL
)

Arguments

data

Named list of numeric vectors, one per environmental variable.

types

Character vector of feature types to generate. Valid values: "linear", "quadratic", "product", "threshold", "hinge". Defaults to all types.

n_thresholds

Integer; number of threshold knots per variable (default: 10).

n_hinges

Integer; number of hinge knots per variable (default: 10).

categorical

Character vector of variable names that should be treated as categorical. These variables will produce binary indicator features (one per distinct level) instead of the continuous feature types. Default is NULL (all variables are continuous).

Value

Named list of external pointers to Feature C++ objects.

Examples

if (FALSE) { # \dontrun{
data <- list(
  temperature   = c(15, 20, 25, 18, 22),
  precipitation = c(100, 200, 150, 80, 300),
  landcover     = c(1, 2, 3, 1, 2)
)
features <- maxent_generate_features(
  data,
  types = c("linear", "hinge"),
  categorical = "landcover"
)
length(features)
} # }