% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_diagnostics.R
\name{maxent_percent_contribution}
\alias{maxent_percent_contribution}
\title{Compute Percent Contribution}
\usage{
maxent_percent_contribution(model, feature_names)
}
\arguments{
\item{model}{External pointer to a FeaturedSpace object.}

\item{feature_names}{Character vector of base variable names.}
}
\value{
A data.frame with columns:
  \describe{
    \item{name}{Variable name}
    \item{contribution}{Percent contribution}
  }
}
\description{
Computes variable contribution based on sum of absolute lambda values
for features derived from each variable. Results sum to 100%.
}
\examples{
n   <- 50L
idx <- c(5L, 15L, 25L, 35L, 45L)
env <- list(temp = runif(n), precip = runif(n))
feats <- maxent_generate_features(env, types = "linear")
model <- maxent_featured_space(n, idx, feats)
maxent_fit(model, max_iter = 100, convergence = 1e-3)
contrib <- maxent_percent_contribution(model, c("temp", "precip"))
contrib  # data.frame with name and contribution
}
