% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_diagnostics.R
\name{maxent_permutation_importance}
\alias{maxent_permutation_importance}
\title{Compute Permutation Importance}
\usage{
maxent_permutation_importance(
  model,
  env_grids,
  feature_names,
  presence_rows,
  presence_cols,
  absence_rows,
  absence_cols,
  seed = 42L
)
}
\arguments{
\item{model}{External pointer to a FeaturedSpace object.}

\item{env_grids}{List of external pointers to Grid<float> objects.}

\item{feature_names}{Character vector of environment variable names,
matching the order of env_grids.}

\item{presence_rows}{Integer vector of presence site row indices (0-based).}

\item{presence_cols}{Integer vector of presence site column indices (0-based).}

\item{absence_rows}{Integer vector of absence/background site row indices.}

\item{absence_cols}{Integer vector of absence/background site column indices.}

\item{seed}{Random seed for reproducibility (default 42).}
}
\value{
A data.frame with columns:
  \describe{
    \item{name}{Variable name}
    \item{permutation_importance}{Normalised importance (\%)}
  }
}
\description{
Measures how much each environmental variable contributes to model
prediction quality by permuting each variable and measuring AUC drop.
Results are normalised so that all importances sum to 100%.
}
\examples{
\donttest{
imp <- maxent_permutation_importance(model, list(g1, g2),
         c("temp", "precip"),
         pres_rows, pres_cols, abs_rows, abs_cols)
imp  # data.frame with name and permutation_importance
}
}
