ecospat (version 2.0)

ecospat.ESM.Modeling: Ensamble of Small Models: Calibration of Simple Bivariate Models

Description

This function calibrates simple bivariate models as in Lomba et al. 2010 and Breiner et al. 2015.

Usage

ecospat.ESM.Modeling( data, NbRunEval, DataSplit, DataSplitTable, weighting.score, models, modeling.id, models.options, which.biva, parallel, cleanup)

Arguments

data
BIOMOD.formated.data object returned by BIOMOD_FormatingData
NbRunEval
number of dataset splitting replicates for the model evaluation (same as in biomod2)
DataSplit
percentage of dataset observations retained for the model training (same as in biomod2)
DataSplitTable
a matrix, data.frame or a 3D array filled with TRUE/FALSE to specify which part of data must be used for models calibration (TRUE) and for models validation (FALSE). Each column corresponds to a 'RUN'. If filled, arguments NbRunEval and DataSplit will be ignored.
weighting.score
evaluation score used to weight single models to build ensembles: 'AUC', 'SomersD' (2xAUC-1), 'Kappa', 'TSS' or 'Boyce'
models
vector of models names choosen among 'GLM', 'GBM', 'GAM', 'CTA', 'ANN', 'SRE', 'FDA', 'MARS', 'RF','MAXENT.Phillips', 'MAXENT.Tsuruoka' (same as in biomod2)
modeling.id
character, the ID (=name) of modeling procedure. A random number by default.
models.options
BIOMOD.models.options object returned by BIOMOD_ModelingOptions (same as in biomod2)
which.biva
integer. which bivariate combinations should be used for modeling? Default: all
parallel
logical. If TRUE, the parallel computing is enabled (highly recommended)
cleanup
numeric. Calls removeTmpFiles() to delete all files from rasterOptions()$tmpdir which are older than the given time (in hours). This might be necessary to prevent running over quota. No cleanup is used by default.

Value

A BIOMOD.models.out object (same as in biomod2) See "BIOMOD.models.out" for details.

Details

The basic idea of ensemble of small models (ESMs) is to model a species distribution based on small, simple models, for example all possible bivariate models (i.e. models that contain only two predictors at a time out of a larger set of predictors), and then combine all possible bivariate models into an ensemble (Lomba et al. 2010; Breiner et al. 2015).

The ESM set of functions could be used to build ESMs using simple bivariate models which are averaged using weights based on model performances (e.g. AUC) according to Breiner et al. (2015). They provide full functionality of the approach described in Breiner et al. (2015).

The argument which.biva allows to split model runs, e.g. if which.biva is 1:3, only the three first bivariate variable combinations will be modeled. This allows to run different biva splits on different computers. However, it is better not to use this option if all models are run on a single computer. Default: running all biva models. NOTE: Make sure to give each of your biva runs a unique modeling.id.

References

Lomba, A., L. Pellissier, C.F. Randin, J. Vicente, F. Moreira, J. Honrado and A. Guisan. 2010. Overcoming the rare species modelling paradox: A novel hierarchical framework applied to an Iberian endemic plant. Biological Conservation, 143,2647-2657. Breiner F.T., A. Guisan, A. Bergamini and M.P. Nobis. 2015. Overcoming limitations of modelling rare species by using ensembles of small models. Methods in Ecology and Evolution, 6,1210-1218.

See Also

ecospat.ESM.EnsembleModeling, ecospat.ESM.Projection, ecospat.ESM.EnsembleProjection

BIOMOD_FormatingData, BIOMOD_ModelingOptions, BIOMOD_Modeling,BIOMOD_Projection

Examples

Run this code
   ## Not run: 
# # Loading test data for the niche dynamics analysis in the invaded range
# inv <- ecospat.testNiche.inv
# 
# # species occurrences
# xy <- inv[,1:2]
# sp_occ <- inv[11]
# 
# # env
# current <- inv[3:10]
# 
# 
# 
# ### Formating the data with the BIOMOD_FormatingData() function form the package biomod2
# setwd(path.wd)
# t1 <- Sys.time()
# sp <- 1
# myBiomodData <- BIOMOD_FormatingData( resp.var = as.numeric(sp_occ[,sp]),
#                                       expl.var = current,
#                                       resp.xy = xy,
#                                       resp.name = colnames(sp_occ)[sp])
# 
# myBiomodOption <- Print_Default_ModelingOptions()
# 
# 
# ### Calibration of simple bivariate models
# my.ESM <- ecospat.ESM.Modeling( data=myBiomodData,
#                                 models=c('GLM','RF'),
#                                 models.options=myBiomodOption,
#                                 NbRunEval=2,
#                                 DataSplit=70,
#                                 weighting.score=c("AUC"),
#                                 parallel=F)  
# 
# 
# ### Evaluation and average of simple bivariate models to ESMs
# my.ESM_EF <- ecospat.ESM.EnsembleModeling(my.ESM,weighting.score=c("SomersD"),threshold=0)
# 
# ### Projection of simple bivariate models into new space 
# my.ESM_proj_current<-ecospat.ESM.Projection(ESM.modeling.output=my.ESM,
#                                             new.env=current)
# 
# ### Projection of calibrated ESMs into new space 
# my.ESM_EFproj_current <- ecospat.ESM.EnsembleProjection(ESM.prediction.output=my.ESM_proj_current,
#                                                         ESM.EnsembleModeling.output=my.ESM_EF)
# 
# ## print a summary of ESM modeling 
# my.ESM
# ## End(Not run)

Run the code above in your browser using DataLab