
Species distribution and home range: MaxEnt features, fit and prediction; k-LoCoH isopleths
Source:R/SpeciesDist.R
MaxentFeatures.RdMaxentFeatures: linear, quadratic, product and hinge features
(scaled by the covariate ranges). MaxentFit: the Gibbs distribution
over background points (presences appended when add_presence)
minimising -mean_presence eta + log sum_b exp(eta) + (l2/2)||lambda||^2 + l1 ||lambda||_1,
by Newton steps (no lasso) or soft-thresholded coordinate descent.
MaxentPredict: raw, logistic and cloglog outputs.
LocohHomeRange: k-LoCoH isopleths, the union of the smallest local
hulls covering a fraction of the points, with exact union areas.
Usage
MaxentFeatures(X, classes = "lq", hinge_knots = 5, ranges = NULL)
MaxentFit(
presence,
background,
l2 = 0,
l1 = 0,
add_presence = TRUE,
max_iter = 500,
tol = 1e-12
)
MaxentPredict(fit, features, output = "cloglog")
LocohHomeRange(points, k, levels = c(0.5, 0.95))Arguments
- X
Covariate matrix.
- classes
Feature classes: l, q, p, h.
- hinge_knots
Number of hinge knots per covariate.
- ranges
List of (min, max) per covariate, or NULL.
- presence, background
Feature matrices of presence and background points.
- l2, l1
Ridge and lasso penalties.
- add_presence
Append presences to the background.
- max_iter, tol
Iteration limit and tolerance.
- fit
Result of
MaxentFit.- features
Feature matrix to predict at.
- output
"raw", "logistic" or "cloglog".
- points
Location matrix (two columns).
- k
Neighbourhood size (point plus k - 1 neighbours).
- levels
Isopleth levels.