Fit the models - Step 3/14

The second step is to set the parameters, by using the BIOMOD_ModelingOptions() function provided by the biomod2 packages, for the modelling algorithms that are going to be used. Here, we will use four different models: generalized linear model (GLM), gradient boosting machine (GBM), generalized additive model (GAM) and maximum entropy (MAXENT):

> myBiomodOption<-BIOMOD_ModelingOptions(GLM=list(type='polynomial'),
+                                    GBM=list(n.trees=1000),
+                                    GAM=list(k=4),
+                                    MAXENT=list(path_to_maxent.jar="../",
+                                                  maximumiterations=1000))

If you want to have a look at the parameters of the four models (here we reported only those of the models chosen) just type:

> myBiomodOption

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 'BIOMOD.Model.Options' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
GLM = list( type = 'polynomial',
    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 = 1000,
    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 = 4,
    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 = 100, 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, keepData = FALSE) ),

MAXENT = list( path_to_maxent.jar = '/Users/paolo/Dropbox/SDM',
    memory_allocated = 512,
    maximumiterations = 1000,
    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,
    defaultprevalence = 0.5)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=