Learn R Programming

biomod2 (version 4.1-2)

bm_RunModelsLoop: Loop to compute all single species distribution models

Description

This internal biomod2 function allows the user to compute all single species distribution models (asked by the BIOMOD_Modeling function).

Usage

bm_RunModelsLoop(
  bm.format,
  modeling.id,
  model,
  bm.options,
  metric.eval,
  var.import,
  save.output = TRUE,
  scale.models = TRUE,
  nb.cpu = 1,
  seed.val = NULL,
  do.progress = TRUE
)

bm_RunModel( model, Data, modeling.id = "", bm.options, calib.lines, weights, nam, dir.name = ".", xy = NULL, eval.data = NULL, eval.xy = NULL, metric.eval = c("ROC", "TSS", "KAPPA"), var.import = 0, save.output = FALSE, scale.models = TRUE, nb.cpu = 1, seed.val = NULL, do.progress = TRUE )

Value

A list containing for each model a list containing the following elements :

  • model : the name of correctly computed model

  • calib.failure : the name of incorrectly computed model

  • pred : the prediction outputs for calibration data

  • pred.eval : the prediction outputs for validation data

  • evaluation : the evaluation outputs returned by the bm_FindOptimStat function

  • var.import : the mean of variables importance returned by the bm_VariablesImportance function

Arguments

bm.format

a BIOMOD.formated.data or BIOMOD.formated.data.PA object returned by the BIOMOD_FormatingData function

modeling.id

a character corresponding to the name (ID) of the simulation set (a random number by default)

model

a character corresponding to the model name to be computed, must be either GLM, GBM, GAM, CTA, ANN, SRE, FDA, MARS, RF, MAXENT.Phillips, MAXENT.Phillips.2

bm.options

a BIOMOD.models.options object returned by the BIOMOD_ModelingOptions function

metric.eval

a vector containing evaluation metric names to be used, must be among ROC, TSS, KAPPA, ACCURACY, BIAS, POD, FAR, POFD, SR, CSI, ETS, HK, HSS, OR, ORSS

var.import

(optional, default NULL)
An integer corresponding to the number of permutations to be done for each variable to estimate variable importance

save.output

(optional, default TRUE)
A logical value defining whether all outputs should be saved on hard drive or not (! strongly recommended !)

scale.models

(optional, default FALSE)
A logical value defining whether all models predictions should be scaled with a binomial GLM or not

nb.cpu

(optional, default 1)
An integer value corresponding to the number of computing resources to be used to parallelize the single models computation

seed.val

(optional, default NULL)
An integer value corresponding to the new seed value to be set

do.progress

(optional, default TRUE)
A logical value defining whether the progress bar is to be rendered or not

Data

a data.frame containing data.species and data.env.var slots of bm.format parameter

calib.lines

a data.frame containing data.split.table slot of bm.format parameter, or an extraction of data.species slot (for a specific PA dataset extracted from PA.table slot)

weights

a vector of numeric values corresponding to observation weights (one per observation)

nam

a character corresponding to the model to be run (name + run.id)

dir.name

(optional, default .)
A character corresponding to the modeling folder

xy

a data.frame containing coord slot of bm.format parameter (for a specific PA dataset extracted from PA.table slot of bm.format parameter)

eval.data

a data.frame containing eval.data.species and eval.data.env.var slots of bm.format parameter

eval.xy

a data.frame containing eval.coord slot of bm.format parameter

Author

Damien Georges

See Also

rpart, prune, gbm, stepAIC, nnet, earth, fda, mars, maxnet, randomForest, BIOMOD_ModelingOptions, BIOMOD_Modeling, bm_MakeFormula, bm_SampleFactorLevels, bm_FindOptimStat, bm_VariablesImportance

Other Secundary functions: bm_BinaryTransformation(), bm_CVnnet(), bm_FindOptimStat(), bm_MakeFormula(), bm_PlotEvalBoxplot(), bm_PlotEvalMean(), bm_PlotRangeSize(), bm_PlotResponseCurves(), bm_PlotVarImpBoxplot(), bm_PseudoAbsences(), bm_SRE(), bm_SampleBinaryVector(), bm_SampleFactorLevels(), bm_VariablesImportance()