predImportEval: Evaluate predictor importance of models trained on simulated...

View source: R/predImportEval.r

predImportEvalR Documentation

Evaluate predictor importance of models trained on simulated data

Description

This function is used evaluate the importance of variables in models trained on simulated data. Typical implementation is to use predImportMakeData to create simulated data sets, then predImportTrainModels to train SDMs on those data sets, then predImportEval to evaluate the models.

Usage

predImportEval(
  simDir,
  modelDir,
  evalDir,
  algos = c("omniscient", "bioclim", "brt", "gam", "glm", "maxent", "maxnet", "rf"),
  type = c("multivariate", "reduced", "univariate"),
  iters = 1:100,
  perms = 30L,
  ia = TRUE,
  overwrite = FALSE,
  fileFlag = NULL,
  userdata = NULL,
  verbose = 1,
  ...
)

Arguments

simDir

Character, path name of directory in which scenario data files are saved.

modelDir

Character, path name of directory in which model files are saved.

evalDir

Character, path name of directory to which to save evaluations.

algos

Character list of model algorithms to evaluate. Options include omniscient, brt (boosted regression trees), gam (generalized additive models), glm (generalized linear models), maxent (Maxent, using version 3.3.3k or before), maxnet (Maxent, version 3.4 or higher), or rf (random forests).

type

Character, type of models to train. Options include multivariate (use all variables in vars, reduced (a series of models, each using all but one variable in vars), and/or univariate (a series of models, one per variable in vars).

iters

Vector of positive integers, data iterations to evaluate.

perms

Positive integer, number of permutations for permutation tests of variable importance. Default is 30.

ia

Logical, if TRUE (default) evaluate the importance of interaction terms in Maxent (permutation importance), BRTs (native importance only) and OMNISCIENT (permutation importance) models.

overwrite

Logical, if TRUE (default) then write over existing evaluation files..

fileFlag

Either NULL or a character string. If a character string then this is included in the simulated data file name and each model file name. If NULL (default), nothing is added, so file names will be as "model XXX.RData". If a character string, then the file name will be as "ALGORITHM FLAG model XXX.RData" where "XXX" is the iteration number, "FLAG" the string in fileFlag, and "ALGORITHM" the model algorithm name.

userdata

Either NULL or a data frame with extra information a user desires to include in the evaluation data frame output by this function. Note that an argument named userdata can also be specified in the predImportMakeData function, which will be stored as part of the sim object created by that function. This sim-associated metadata will also be included in the evaluation data frame.

verbose

Numeric, if 0 then show minimal output, 1 more output, 2 even more, >2 all of it.

...

Arguments to pass to iaImport.

Value

Nothing (saves a data frame to disc).

See Also

predImportMakeData, predImportTrainModels


adamlilith/enmSdmPredImport documentation built on Dec. 31, 2022, 5:40 p.m.