<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Dear Blaise,</div><div><br></div><div>interaction.depth reflects the size of the trees to fit at each iteration. One means means only one node and two leaves, and so on.&nbsp;</div><div>There is no magic value and one should select the optimal number using independant datasets or cross-validation. However, interaction.deph is also influencing the learning rate (skrinkage).&nbsp;</div><div>Given the BRT is aready quite time-consuming I did not write such a function which would find the optimal numbers.&nbsp;</div><div>Instead, I followed Elith et al. Journal of Animal Ecology 2009 where 7 for interaction.depth and skrinkage of 0.001 were the most suitable numbers.&nbsp;</div><div><br></div><div>If some of you would like to change this parameter, I cold easily add it to the Models call so that each of you can change the default value for interaction.depth and shrinkage</div><div><br></div><div>All the best,</div><div>Wilfried</div><div><br></div><div><br></div><div><br></div><br><div><div>Le 9 nov. 10 à 10:09, Blaise Petitpierre a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite">Dear BIOMODER, <br><br>I had a look on the Biomod.Models() function and I was wondering why interaction depth was set to 7 in the GBM function. <br><br>gbm(eval(parse(text = paste(SpNames[i], <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; paste(scopeExpSyst(DataBIOMOD[1:10, 1:NbVar], <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "GBM"), collapse = "")))), data = DataBIOMOD[calib.lines, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ], distribution = "bernoulli", var.monotone = rep(0, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; length = NbVar), w = Yweights[calib.lines, <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i], <b>interaction.depth = 7</b>, shrinkage = 0.001, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bag.fraction = 0.5, train.fraction = 1, verbose = F, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cv.folds = 5)<br><br><br><br>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) ?<br> <br>However I was wondering the effect of interaction depth on overfitting. <br><br>Cheers, <br>Blaise Petitpierre<br> _______________________________________________<br>Biomod-commits mailing list<br><a href="mailto:Biomod-commits@lists.r-forge.r-project.org">Biomod-commits@lists.r-forge.r-project.org</a><br>https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/biomod-commits<br></blockquote></div><br><div apple-content-edited="true"> <div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>-------------------------</div><div>Dr. Wilfried Thuiller</div><div>Laboratoire d'Ecologie Alpine, UMR CNRS 5553</div><div>Université Joseph Fourier</div><div>BP53, 38041 Grenoble cedex 9, France</div><div>tel: +33 (<span class="Apple-style-span" style="border-collapse: collapse; font-family: Arial, Helvetica, sans-serif; -webkit-border-horizontal-spacing: 10px; -webkit-border-vertical-spacing: 10px; ">0)4 76 51 44 97</span></div><div>fax: +33 (0)4 76 51 42 79</div><div><br></div><div>Email:&nbsp;<a href="mailto:wilfried.thuiller@ujf-grenoble.fr">wilfried.thuiller@ujf-grenoble.fr</a><br>Home page:&nbsp;<a href="http://www.will.chez-alice.fr/">http://www.will.chez-alice.fr</a><br>Website:&nbsp;<a href="http://www-leca.ujf-grenoble.fr/equipes/tde.htm">http://www-leca.ujf-grenoble.fr/equipes/tde.htm</a><br><br>FP6 European MACIS project:&nbsp;<a href="http://www.macis-project.net/">http://www.macis-project.net</a><br>FP6 European EcoChange project:&nbsp;<a href="http://www.ecochange-project.eu/">http://www.ecochange-project.eu</a></div><div><br></div><div><br></div><div><br></div></div></span><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"> </div><br></body></html>