[Biomod-commits] Interaction between variables in GBM

Blaise Petitpierre bpetitpierre at gmail.com
Tue Nov 9 10:09:59 CET 2010


I had a look on the Biomod.Models() function and I was wondering why
interaction depth was set to 7 in the GBM function.

gbm(eval(parse(text = paste(SpNames[i],
                  paste(scopeExpSyst(DataBIOMOD[1:10, 1:NbVar],
                    "GBM"), collapse = "")))), data =
                  ], distribution = "bernoulli", var.monotone = rep(0,
                  length = NbVar), w = Yweights[calib.lines,
                  i], *interaction.depth = 7*, shrinkage = 0.001,
                  bag.fraction = 0.5, train.fraction = 1, verbose = F,
                  cv.folds = 5)

Interaction depth is the maximum depth of variable interactions. 1 implies
an additive model, 2 implies a model with up to 2-way interactions, etc... I
was wondering if it was because 7 variables were used in the tutorial but in
this case, wouldn't be better to set the interaction depth to the number of
variables (NbVar) ?

However I was wondering the effect of interaction depth on overfitting.

Blaise Petitpierre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/biomod-commits/attachments/20101109/22be7a9c/attachment.htm>

More information about the Biomod-commits mailing list