Learn R Programming

biomod2 (version 4.2-5)

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,
  weights,
  calib.lines,
  modeling.id,
  models,
  models.pa,
  bm.options,
  metric.eval,
  var.import,
  scale.models = TRUE,
  nb.cpu = 1,
  seed.val = NULL,
  do.progress = TRUE
)

bm_RunModel( model, run.name, dir.name = ".", modeling.id = "", bm.options, Data, weights.vec, calib.lines.vec, eval.data = NULL, metric.eval = c("ROC", "TSS", "KAPPA"), var.import = 0, 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 evaluation 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

weights

a matrix containing observation weights for each pseudo-absence (or allData) dataset

calib.lines

a matrix containing calibration / validation lines for each pseudo-absence (or allData) x repetition (or allRun) combination that can be obtained with the bm_CrossValidation function

modeling.id

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

models

a vector containing model names to be computed, must be among ANN, CTA, FDA, GAM, GBM, GLM, MARS, MAXENT, MAXNET, RF, SRE, XGBOOST

models.pa

(optional, default NULL)
A list containing for each model a vector defining which pseudo-absence datasets are to be used, must be among colnames(bm.format@PA.table)

bm.options

a BIOMOD.models.options object returned by the bm_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

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

model

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

run.name

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

dir.name

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

Data

a data.frame containing observations, coordinates and environmental variables that can be obtained with the get_species_data function

weights.vec

a vector containing observation weights the concerned pseudo-absence (or allData) dataset

calib.lines.vec

a vector containing calibration / validation lines for the concerned pseudo-absence (or allData) x repetition (or allRun) combination

eval.data

(optional, default NULL)
A data.frame containing validation observations, coordinates and environmental variables that can be obtained with the get_eval_data function

Author

Damien Georges

See Also

rpart, prune, gbm, nnet, earth, fda, mars, maxnet, randomForest, xgboost, bm_ModelingOptions, BIOMOD_Modeling, bm_MakeFormula, bm_SampleFactorLevels, bm_FindOptimStat, bm_VariablesImportance

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