| glmnet_mx | R Documentation |
This function fits Maxent-like models using the glmnet package, designed
for presence-background data.
glmnet_mx(p, data, f, regmult = 1.0, regfun = maxnet.default.regularization,
addsamplestobackground = TRUE, weights = NULL, ...)
p |
A vector of binary presence-background labels, where 1 indicates presence and 0 indicates background. |
data |
A |
f |
A formula specifying the model to be fitted, in the format used by
|
regmult |
(numeric) Regularization multiplier, default is 1.0. |
regfun |
A function that calculates regularization penalties. Default is
|
addsamplestobackground |
(logical) Whether to add presence points not in
the background to the background data. Default is |
weights |
(numeric) A numeric vector of weights for each observation.
Default is |
... |
Additional arguments to pass to |
This function is modified from the package maxnet and fits a Maxent-like
model using regularization to avoid over-fitting. Regularization weights
are computed using a provided function (which can be changed) and can be
multiplied by a regularization multiplier (regmult). The function also
includes an option to calculate AIC.
A fitted Maxent-like model object of class glmnet_mx, which
includes model coefficients, AIC (if requested), and other elements
such as feature mins and maxes, sample means, and entropy.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.