Description Usage Arguments Details Value Warning Author(s) References See Also Examples
Project a fitted Maxent model by predicting to new environmental data.
1 | project_maxent(lambdas, newdata, mask, quiet = FALSE)
|
lambdas |
Either a |
newdata |
A |
mask |
(Optional; requires that |
quiet |
Logical. Should projection progress be reported? |
project_maxent uses feature weights described in a .lambas
file or MaxEnt object to predict a Maxent model to environmental
data. This function performs the projection entirely in R, without the need
for the Maxent Java software. For tested datasets, it performs the
projection in roughly one third of the time taken for the same projection
by maxent.jar.
If newdata is a RasterStack or RasterBrick, a
list with two elements:
prediction_raw: a Raster layer giving the raw Maxent
prediction; and
prediction_logistic: a Raster layer giving the
logistic Maxent prediction.
If newdata is not a RasterStack or RasterBrick,
the raster layers will be replaced with data.tables in the returned
list.
This function is still in development, and no guarantee is made for the accuracy of its projections.
John B. Baumgartner, johnbaums@gmail.com
Wilson, P. W. (2009) Guidelines for computing MaxEnt model output values from a lambdas file.
Maxent software for species habitat modeling, version 3.3.3k help file (software freely available here).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Below we use the dismo::maxent example to fit a Maxent model:
if (require(dismo) && require(rJava) &&
file.exists(file.path(system.file(package='dismo'), 'java/maxent.jar'))) {
fnames <- list.files(path=paste(system.file(package="dismo"), '/ex', sep=''),
pattern='grd', full.names=TRUE )
predictors <- stack(fnames)
occurence <- paste(system.file(package="dismo"), '/ex/bradypus.csv', sep='')
occ <- read.table(occurence, header=TRUE, sep=',')[,-1]
me <- maxent(predictors, occ, factors='biome')
# ... and then predict it to the full environmental grids:
pred <- project_maxent(me, predictors)
# This is equivalent to using the predict method for MaxEnt objects:
pred2 <- predict(me, predictors)
all.equal(values(pred$prediction_logistic), values(pred2))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.