% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_diagnostics.R
\name{maxent_mess}
\alias{maxent_mess}
\title{Compute MESS (Multivariate Environmental Similarity Surface)}
\usage{
maxent_mess(env_grids, reference_values, feature_names)
}
\arguments{
\item{env_grids}{List of external pointers to Grid<float> objects.}

\item{reference_values}{List of numeric vectors with reference values
for each variable (e.g. values at training sites).}

\item{feature_names}{Character vector of variable names.}
}
\value{
A named list with:
  \describe{
    \item{mess_grid}{External pointer to Grid<float> with MESS values}
    \item{mod_grid}{External pointer to Grid<float> with Most Dissimilar
      Variable index (1-based)}
  }
}
\description{
Measures how similar each cell is to the training environment using the
full distribution of reference values. Negative MESS values indicate
novel (non-analog) environments.
}
\examples{
\donttest{
result <- maxent_mess(list(g1, g2),
            list(temp_train_vals, precip_train_vals),
            c("temp", "precip"))
mess_mat <- maxent_grid_to_matrix(result$mess_grid)
mod_mat  <- maxent_grid_to_matrix(result$mod_grid)
}
}
