BIOMOD_ModelingOptions: Configure the modeling options for each selected model

Description Usage Arguments Details Value GLM (glm) GBM (default gbm) GAM (gam or gam) CTA (rpart) ANN (nnet) SRE (sre) FDA (fda) MARS (earth) RF (randomForest) MAXENT.Phillips (www.cs.princeton.edu/~schapire/maxent/) MAXENT.Tsuruoka (maxent) Author(s) Examples

Description

Parametrize and/or tune biomod's single models options.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
BIOMOD_ModelingOptions(GLM = NULL,
                         GBM = NULL,
                         GAM = NULL,
                         CTA = NULL,
                         ANN = NULL,
                         SRE = NULL,
                         FDA = NULL,
                         MARS = NULL,
                         RF = NULL,
                         MAXENT.Phillips = NULL,
                         MAXENT.Tsuruoka = NULL)

Arguments

GLM

list, GLM options

GBM

list, GBM options

GAM

list, GAM options

CTA

list, CTA options

ANN

list, ANN options

SRE

list, SRE options

FDA

list, FDA options

MARS

list, MARS options

RF

list, RF options

MAXENT.Phillips

list, MAXENT.Phillips options

MAXENT.Tsuruoka

list, MAXENT.Tsuruoka options

Details

The aim of this function is to allow advanced user to change some default parameters of BIOMOD inner models. For each modeling technique, options can be set up.

Each argument have to be put in a list object.

The best way to use this function is to print defaut models options (Print_Default_ModelingOptions) or create a default 'BIOMOD.model.option object' and print it in your console. Then copy the output, change only the required parameters, and paste it as function arguments. (see example)

Here the detailed list of modifiable parameters. They correspond to the traditional parameters that could be setted out for each modeling technique (e.g. ?GLM)

Value

A "BIOMOD.Model.Options" object given to BIOMOD_Modeling

GLM (glm)

GBM (default gbm)

Please refer to gbm help file to get the meaning of this options.

GAM (gam or gam)

CTA (rpart)

Please refer to rpart help file to get the meaning of the following options.

NOTE: for method and parms, you can give a 'real' value as described in the rpart help file or 'default' that implies default rpart values.

ANN (nnet)

SRE (sre)

FDA (fda)

Please refer to fda help file to get the meaning of these options.

MARS (earth)

Please refer to earth help file to get the meaning of these options.

RF (randomForest)

NOTE: for mtry, you can give a 'real' value as described in randomForest help file or 'default' that implies default randomForest values

MAXENT.Phillips (www.cs.princeton.edu/~schapire/maxent/)

MAXENT.Tsuruoka (maxent)

NOTE: if you use the set_heldout parameter then the data that will be held out will be taken in the calibration data pool. It can be penilizing in case of low number of occurences dataset.

Author(s)

Damien Georges, Wilfried Thuiller

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
  ## default BIOMOD.model.option object
  myBiomodOptions <- BIOMOD_ModelingOptions()
  
  ## print the object
  myBiomodOptions
  
  ## you can copy a part of the print, change it and custom your options 
  ## here we want to compute quadratic GLM and select best model with 'BIC' criterium
  myBiomodOptions <- BIOMOD_ModelingOptions(
    GLM = list( type = 'quadratic',
                interaction.level = 0,
                myFormula = NULL,
                test = 'BIC',
                family = 'binomial',
                control = glm.control(epsilon = 1e-08, 
                                      maxit = 1000, 
                                      trace = FALSE) ))
  
  ## check changes was done
  myBiomodOptions
  
  ##' you can prefer to establish your own GLM formula
  myBiomodOptions <- BIOMOD_ModelingOptions(
    GLM = list( myFormula = formula("Sp277 ~ bio3 + 
                    log(bio10) + poly(bio16,2) + bio19 + bio3:bio19")))
  
  ## check changes was done
  myBiomodOptions
  
  ##' you also can directly print default parameters and then follow the same processus
  Print_Default_ModelingOptions()
  

Example output

Loading required package: sp
Loading required package: raster
Loading required package: parallel
Loading required package: reshape
Loading required package: ggplot2
biomod2 3.3-7.1 loaded.

Type browseVignettes(package='biomod2') to access directly biomod2 vignettes.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=  'BIOMOD.Model.Options'  -=-=-=-=-=-=-=-=-=-=-=-=-=-=


GLM = list( type = 'quadratic',
            interaction.level = 0,
            myFormula = NULL,
            test = 'AIC',
            family = binomial(link = 'logit'),
            mustart = 0.5,
            control = glm.control(epsilon = 1e-08, maxit = 50, trace = FALSE
) ),


GBM = list( distribution = 'bernoulli',
            n.trees = 2500,
            interaction.depth = 7,
            n.minobsinnode = 5,
            shrinkage = 0.001,
            bag.fraction = 0.5,
            train.fraction = 1,
            cv.folds = 3,
            keep.data = FALSE,
            verbose = FALSE,
            perf.method = 'cv'),

GAM = list( algo = 'GAM_mgcv',
            type = 's_smoother',
            k = -1,
            interaction.level = 0,
            myFormula = NULL,
            family = binomial(link = 'logit'),
            method = 'GCV.Cp',
            optimizer = c('outer','newton'),
            select = FALSE,
            knots = NULL,
            paraPen = NULL,
            control = list(nthreads = 1, irls.reg = 0, epsilon = 1e-07
, maxit = 200, trace = FALSE, mgcv.tol = 1e-07, mgcv.half = 15
, rank.tol = 1.49011611938477e-08
, nlm = list(ndigit=7, gradtol=1e-06, stepmax=2, steptol=1e-04, iterlim=200, check.analyticals=0)
, optim = list(factr=1e+07)
, newton = list(conv.tol=1e-06, maxNstep=5, maxSstep=2, maxHalf=30, use.svd=0)
, outerPIsteps = 0, idLinksBases = TRUE, scalePenalty = TRUE, efs.lspmax = 15
, efs.tol = 0.1, keepData = FALSE, scale.est = fletcher, edge.correct = FALSE
) ),


CTA = list( method = 'class',
            parms = 'default',
            cost = NULL,
            control = list(xval = 5, minbucket = 5, minsplit = 5, cp = 0.001
, maxdepth = 25) ),


ANN = list( NbCV = 5,
            size = NULL,
            decay = NULL,
            rang = 0.1,
            maxit = 200),

SRE = list( quant = 0.025),

FDA = list( method = 'mars',
            add_args = NULL),

MARS = list( type = 'simple',
             interaction.level = 0,
             myFormula = NULL,
             nk = NULL,
             penalty = 2,
             thresh = 0.001,
             nprune = NULL,
             pmethod = 'backward'),

RF = list( do.classif = TRUE,
           ntree = 500,
           mtry = 'default',
           nodesize = 5,
           maxnodes = NULL),

MAXENT.Phillips = list( path_to_maxent.jar = '/work/tmp',
               memory_allocated = 512,
               background_data_dir = 'default',
               maximumbackground = 'default',
               maximumiterations = 200,
               visible = FALSE,
               linear = TRUE,
               quadratic = TRUE,
               product = TRUE,
               threshold = TRUE,
               hinge = TRUE,
               lq2lqptthreshold = 80,
               l2lqthreshold = 10,
               hingethreshold = 15,
               beta_threshold = -1,
               beta_categorical = -1,
               beta_lqp = -1,
               beta_hinge = -1,
               betamultiplier = 1,
               defaultprevalence = 0.5),

MAXENT.Tsuruoka = list( l1_regularizer = 0,
                        l2_regularizer = 0,
                        use_sgd = FALSE,
                        set_heldout = 0,
                        verbose = FALSE)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

-=-=-=-=-=-=-=-=-=-=-=-=-=-=  'BIOMOD.Model.Options'  -=-=-=-=-=-=-=-=-=-=-=-=-=-=


GLM = list( type = 'quadratic',
            interaction.level = 0,
            myFormula = NULL,
            test = 'BIC',
            family = binomial(link = 'logit'),
            mustart = 0.5,
            control = glm.control(epsilon = 1e-08, maxit = 1000, trace = FALSE
) ),


GBM = list( distribution = 'bernoulli',
            n.trees = 2500,
            interaction.depth = 7,
            n.minobsinnode = 5,
            shrinkage = 0.001,
            bag.fraction = 0.5,
            train.fraction = 1,
            cv.folds = 3,
            keep.data = FALSE,
            verbose = FALSE,
            perf.method = 'cv'),

GAM = list( algo = 'GAM_mgcv',
            type = 's_smoother',
            k = -1,
            interaction.level = 0,
            myFormula = NULL,
            family = binomial(link = 'logit'),
            method = 'GCV.Cp',
            optimizer = c('outer','newton'),
            select = FALSE,
            knots = NULL,
            paraPen = NULL,
            control = list(nthreads = 1, irls.reg = 0, epsilon = 1e-07
, maxit = 200, trace = FALSE, mgcv.tol = 1e-07, mgcv.half = 15
, rank.tol = 1.49011611938477e-08
, nlm = list(ndigit=7, gradtol=1e-06, stepmax=2, steptol=1e-04, iterlim=200, check.analyticals=0)
, optim = list(factr=1e+07)
, newton = list(conv.tol=1e-06, maxNstep=5, maxSstep=2, maxHalf=30, use.svd=0)
, outerPIsteps = 0, idLinksBases = TRUE, scalePenalty = TRUE, efs.lspmax = 15
, efs.tol = 0.1, keepData = FALSE, scale.est = fletcher, edge.correct = FALSE
) ),


CTA = list( method = 'class',
            parms = 'default',
            cost = NULL,
            control = list(xval = 5, minbucket = 5, minsplit = 5, cp = 0.001
, maxdepth = 25) ),


ANN = list( NbCV = 5,
            size = NULL,
            decay = NULL,
            rang = 0.1,
            maxit = 200),

SRE = list( quant = 0.025),

FDA = list( method = 'mars',
            add_args = NULL),

MARS = list( type = 'simple',
             interaction.level = 0,
             myFormula = NULL,
             nk = NULL,
             penalty = 2,
             thresh = 0.001,
             nprune = NULL,
             pmethod = 'backward'),

RF = list( do.classif = TRUE,
           ntree = 500,
           mtry = 'default',
           nodesize = 5,
           maxnodes = NULL),

MAXENT.Phillips = list( path_to_maxent.jar = '/work/tmp',
               memory_allocated = 512,
               background_data_dir = 'default',
               maximumbackground = 'default',
               maximumiterations = 200,
               visible = FALSE,
               linear = TRUE,
               quadratic = TRUE,
               product = TRUE,
               threshold = TRUE,
               hinge = TRUE,
               lq2lqptthreshold = 80,
               l2lqthreshold = 10,
               hingethreshold = 15,
               beta_threshold = -1,
               beta_categorical = -1,
               beta_lqp = -1,
               beta_hinge = -1,
               betamultiplier = 1,
               defaultprevalence = 0.5),

MAXENT.Tsuruoka = list( l1_regularizer = 0,
                        l2_regularizer = 0,
                        use_sgd = FALSE,
                        set_heldout = 0,
                        verbose = FALSE)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

-=-=-=-=-=-=-=-=-=-=-=-=-=-=  'BIOMOD.Model.Options'  -=-=-=-=-=-=-=-=-=-=-=-=-=-=


GLM = list( type = 'quadratic',
            interaction.level = 0,
            myFormula = Sp277 ~ bio3 + log(bio10) + poly(bio16, 2) + bio19 + bio3:bio19,
            test = 'AIC',
            family = binomial(link = 'logit'),
            mustart = 0.5,
            control = glm.control(epsilon = 1e-08, maxit = 50, trace = FALSE
) ),


GBM = list( distribution = 'bernoulli',
            n.trees = 2500,
            interaction.depth = 7,
            n.minobsinnode = 5,
            shrinkage = 0.001,
            bag.fraction = 0.5,
            train.fraction = 1,
            cv.folds = 3,
            keep.data = FALSE,
            verbose = FALSE,
            perf.method = 'cv'),

GAM = list( algo = 'GAM_mgcv',
            type = 's_smoother',
            k = -1,
            interaction.level = 0,
            myFormula = NULL,
            family = binomial(link = 'logit'),
            method = 'GCV.Cp',
            optimizer = c('outer','newton'),
            select = FALSE,
            knots = NULL,
            paraPen = NULL,
            control = list(nthreads = 1, irls.reg = 0, epsilon = 1e-07
, maxit = 200, trace = FALSE, mgcv.tol = 1e-07, mgcv.half = 15
, rank.tol = 1.49011611938477e-08
, nlm = list(ndigit=7, gradtol=1e-06, stepmax=2, steptol=1e-04, iterlim=200, check.analyticals=0)
, optim = list(factr=1e+07)
, newton = list(conv.tol=1e-06, maxNstep=5, maxSstep=2, maxHalf=30, use.svd=0)
, outerPIsteps = 0, idLinksBases = TRUE, scalePenalty = TRUE, efs.lspmax = 15
, efs.tol = 0.1, keepData = FALSE, scale.est = fletcher, edge.correct = FALSE
) ),


CTA = list( method = 'class',
            parms = 'default',
            cost = NULL,
            control = list(xval = 5, minbucket = 5, minsplit = 5, cp = 0.001
, maxdepth = 25) ),


ANN = list( NbCV = 5,
            size = NULL,
            decay = NULL,
            rang = 0.1,
            maxit = 200),

SRE = list( quant = 0.025),

FDA = list( method = 'mars',
            add_args = NULL),

MARS = list( type = 'simple',
             interaction.level = 0,
             myFormula = NULL,
             nk = NULL,
             penalty = 2,
             thresh = 0.001,
             nprune = NULL,
             pmethod = 'backward'),

RF = list( do.classif = TRUE,
           ntree = 500,
           mtry = 'default',
           nodesize = 5,
           maxnodes = NULL),

MAXENT.Phillips = list( path_to_maxent.jar = '/work/tmp',
               memory_allocated = 512,
               background_data_dir = 'default',
               maximumbackground = 'default',
               maximumiterations = 200,
               visible = FALSE,
               linear = TRUE,
               quadratic = TRUE,
               product = TRUE,
               threshold = TRUE,
               hinge = TRUE,
               lq2lqptthreshold = 80,
               l2lqthreshold = 10,
               hingethreshold = 15,
               beta_threshold = -1,
               beta_categorical = -1,
               beta_lqp = -1,
               beta_hinge = -1,
               betamultiplier = 1,
               defaultprevalence = 0.5),

MAXENT.Tsuruoka = list( l1_regularizer = 0,
                        l2_regularizer = 0,
                        use_sgd = FALSE,
                        set_heldout = 0,
                        verbose = FALSE)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

 Defaut modeling options. copy, change what you want paste it as arg to BIOMOD_ModelingOptions


-=-=-=-=-=-=-=-=-=-=-=-=-=-=  'BIOMOD.Model.Options'  -=-=-=-=-=-=-=-=-=-=-=-=-=-=


GLM = list( type = 'quadratic',
            interaction.level = 0,
            myFormula = NULL,
            test = 'AIC',
            family = binomial(link = 'logit'),
            mustart = 0.5,
            control = glm.control(epsilon = 1e-08, maxit = 50, trace = FALSE
) ),


GBM = list( distribution = 'bernoulli',
            n.trees = 2500,
            interaction.depth = 7,
            n.minobsinnode = 5,
            shrinkage = 0.001,
            bag.fraction = 0.5,
            train.fraction = 1,
            cv.folds = 3,
            keep.data = FALSE,
            verbose = FALSE,
            perf.method = 'cv'),

GAM = list( algo = 'GAM_mgcv',
            type = 's_smoother',
            k = -1,
            interaction.level = 0,
            myFormula = NULL,
            family = binomial(link = 'logit'),
            method = 'GCV.Cp',
            optimizer = c('outer','newton'),
            select = FALSE,
            knots = NULL,
            paraPen = NULL,
            control = list(nthreads = 1, irls.reg = 0, epsilon = 1e-07
, maxit = 200, trace = FALSE, mgcv.tol = 1e-07, mgcv.half = 15
, rank.tol = 1.49011611938477e-08
, nlm = list(ndigit=7, gradtol=1e-06, stepmax=2, steptol=1e-04, iterlim=200, check.analyticals=0)
, optim = list(factr=1e+07)
, newton = list(conv.tol=1e-06, maxNstep=5, maxSstep=2, maxHalf=30, use.svd=0)
, outerPIsteps = 0, idLinksBases = TRUE, scalePenalty = TRUE, efs.lspmax = 15
, efs.tol = 0.1, keepData = FALSE, scale.est = fletcher, edge.correct = FALSE
) ),


CTA = list( method = 'class',
            parms = 'default',
            cost = NULL,
            control = list(xval = 5, minbucket = 5, minsplit = 5, cp = 0.001
, maxdepth = 25) ),


ANN = list( NbCV = 5,
            size = NULL,
            decay = NULL,
            rang = 0.1,
            maxit = 200),

SRE = list( quant = 0.025),

FDA = list( method = 'mars',
            add_args = NULL),

MARS = list( type = 'simple',
             interaction.level = 0,
             myFormula = NULL,
             nk = NULL,
             penalty = 2,
             thresh = 0.001,
             nprune = NULL,
             pmethod = 'backward'),

RF = list( do.classif = TRUE,
           ntree = 500,
           mtry = 'default',
           nodesize = 5,
           maxnodes = NULL),

MAXENT.Phillips = list( path_to_maxent.jar = '/work/tmp',
               memory_allocated = 512,
               background_data_dir = 'default',
               maximumbackground = 'default',
               maximumiterations = 200,
               visible = FALSE,
               linear = TRUE,
               quadratic = TRUE,
               product = TRUE,
               threshold = TRUE,
               hinge = TRUE,
               lq2lqptthreshold = 80,
               l2lqthreshold = 10,
               hingethreshold = 15,
               beta_threshold = -1,
               beta_categorical = -1,
               beta_lqp = -1,
               beta_hinge = -1,
               betamultiplier = 1,
               defaultprevalence = 0.5),

MAXENT.Tsuruoka = list( l1_regularizer = 0,
                        l2_regularizer = 0,
                        use_sgd = FALSE,
                        set_heldout = 0,
                        verbose = FALSE)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

biomod2 documentation built on May 2, 2019, 5:08 p.m.