<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Dear Daisy,</div><div><br></div><div>Very interesting.&nbsp;</div><div><br></div><div><blockquote type="cite"><div>I am having some problems running the model with my presence and<br>absence data. &nbsp;I am running the model for a single species and have<br>used &nbsp;a weight matrix so the sum of my observations (944 observations)<br>is equal to the absences (38181 absences). &nbsp;I am having &nbsp;2 problems:<br><br>1)<span class="Apple-tab-span" style="white-space:pre">        </span>When I run the models everything goes smoothly until the model RF.<br>Then I get the error message: Model=Breiman and Cutler's random<br>forests for classification and regression &nbsp;Error: cannot allocate<br>vector of size 447.8 Mb. &nbsp;I understand this is a common problem but I<br>only receive this error with the RF model. If I turn off all the other<br>models it still does not run. Additionally, the RF does run when I use<br>pseudo-absences instead of weighting the absences in my data. I have<br>also made sure to: rm(list = ls()), gc(), memory.limit(size = 4095).<br>Any advice would be helpful.<br></div></blockquote><div><br></div><div>Very interesting. RF is usually not very computer demanding. It seems that using the weight parameter increases the use of memory way too much.&nbsp;</div><div>Sounds like RF is not very well coded for handling such effects (a matter of the randomForest library).</div><div>&nbsp;</div><div>In any case, I am indeed wondering why using so many absences. Some absences are probably bringing the same information anyway.&nbsp;</div><div>It might work better if you indeed run the pseudo-absence procedure on those absences and repeat the process several times.&nbsp;</div><div>Another solution is to select the absence which are the most important. To do that, just extract the explanatory variables on the your absences, then run a dissimilarity matrix. You'll have the environmental difference for your absence. Then run a cluster analysis. It is going to group your absences based on environmental similarities. You can stop the cluster let's say at 5000 groups.&nbsp;</div><div>Then sample one or two (or more, could be weighted by the number of sites in each group to still represent the environmental bias in the data) sites in each group. They will be your absences.&nbsp;</div><div>This is something not implemented in BIOMOD yet but I am wondering if it should not.&nbsp;</div><br><blockquote type="cite"><div><br>The following is how I have set up my model:<br>Models(GLM = T, TypeGLM = "poly", Test = "AIC", GBM = T, No.trees =<br>3000, GAM = T, Spline = 3, CTA = T, CV.tree = 50, ANN = T, CV.ann = 2,<br>SRE = T, Perc025=T, Perc05=F, MDA = T, MARS = T, RF = T, NbRunEval =<br>3, DataSplit = 80, Yweights=weightsall$COPORNA, Roc = T,<br>Optimized.Threshold.Roc = T,Kappa = T, TSS=T, KeepPredIndependent = T,<br>VarImport=5, &nbsp;NbRepPA=0, strategy="circles", coor= NULL, distance= 0 ,<br>nb.absences=NULL)<br><br>2)<span class="Apple-tab-span" style="white-space:pre">        </span>After running this model I also receive an abundance of warning<br>messages including:<br>In gbm.perf(model.sp, method = "OOB", <a href="http://plot.it">plot.it</a> = F) : &nbsp;&nbsp;OOB generally<br>underestimates the optimal number of iterations although predictive<br>performance is reasonably competitive. Using cv.folds&gt;0 when calling<br>gbm usually results in improved predictive performance.<br>In glm.fit(X, y, wt, offset = object$offset, family = object$family,<br>... : &nbsp;&nbsp;algorithm did not converge<br>In glm.fit(X, y, wt, offset = object$offset, family = object$family,<br>... : &nbsp;&nbsp;fitted probabilities numerically 0 or 1 occurred<br><br></div></blockquote><div><br></div><div>Yes and no.&nbsp;</div><div><br></div><div>We need to optimize GBM a bit better. We use OOB instead of CV because from my experience it is faster and does not change the results compare to CV. We might need to check it using virtual data but I am afraid we do not have time at the moment.&nbsp;</div><div>The Warning is coming from the GBM library. It is not a BIOMOD warning.&nbsp;</div><div><br></div><div>For GLM, yes it is often the case. GLM is supposed to fit probability of occurrence not 0 and 1. When the model tends to over-fit or when there are two many absences (or respectively presences) compare to presences (respectively absences), the model tends to fit probabilities of occurrence which are very close to 0 and 1 (kind of bimodal curve). It does not like it and let you know. In a more pragmatic term, it is not too much important but you need to be aware that there is probably an overfit problem.&nbsp;</div><div><br></div><div>Hope it helps,</div><div>Wilfried</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><br><blockquote type="cite"><div>Do I need to worry about these?<br><br>Thank you,<br><br>Daisy Englert<br>Macquarie University<br>Sydney, NSW<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></div></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; 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; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; 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><span class="Apple-style-span" style="font-size: 12px; "><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 (0)4 76 63 54 53</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></span></div></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br></body></html>