Description Usage Arguments Value Examples
Build a MLP species distribution model from the output from a operating model (or grid) using the neuralnet package. The model is fit with 3 neurons in the hidden layer (which is good for this particular simulation). If it gets much more complicated, can try different values. But training time increases exponentially with additional neurons. The variables are normalized to a common scale before training the MLPs. Models fit to both the presence (pres column) and log(abundance) are returned.
1 2 3 4 5 6 |
x |
(required) An operating model as output from one of the operating model functions (such as |
covariates |
Covariates to use in the SDM. Must be in the operating model output (in the columns of x$grid). If left off, all covariates in x (in x$meta$covariates) are used. |
start.forecast.year |
The years before 'start.forecast.year' will be used for fitting (training data) and the years from 'start.forecast.year' onward are the forecasted years (testing data) |
control |
The control parameters for the 'neuralnet::neuralnet' call. |
A SDM object, which is a list with the presence and abundance fits and the meta data.
1 2 3 4 5 | sim <- SimulateWorld(start.year=2015, n.year=20)
fit <- mlp_sdm(sim, "temp")$abundance
dat <- fit$data #data used for fit
dat$mlpAbun <- predict(fit, dat)
plot(dat$temp, dat$mlpAbun)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.