[Biomod-commits] error message FDA - RF

Wilfried Thuiller wilfried.thuiller at ujf-grenoble.fr
Tue Mar 6 20:23:50 CET 2012


Dear Ahmed,

> I am new to BIOMOD, and I have a couple of problems while running FDA and RF .
> I am using the latest version of R (2.14.2) and BIOMOD V1.1-7.00 downloaded from: http://www.will.chez-alice.fr/Software.html - I am using Windows 7 (32 bit) (3GB of ram - core i3)
> 
> While running RF, I am always got this error message:
>         Error: cannot allocate vector of size 596.2 Mb

You do not enough RAM unfortunately. 
Would be better to work on 64 bit machine. 

However, you may give a try with this trick, not sure if this is gonna work, but let's give it a try:

Make a shortcut of the R.exe program.
Copy and paste this shortcut into your working directory.
Right click on the short cut and add the following command in the target window

--max-mem-size=5000000000

So in the target window, you'll have something like


"C:\Program Files\R\Rgui.exe" --max-mem-size=5000000000
Then double click on the shortcut and try again random forest.


If you are using Tinn-R, they is also a similar procedure that gives the same results. I do not know if it is working on Win7 (I am a Mac user) but it used to work on Win XP. 

> For FDA, it was working fine on the tutorial data but when I am trying to work on my own data, I am receiving this error:
>         Error in if (min(Fit) < 0) Fit[Fit < 0] <- 0 : 
>         missing value where TRUE/FALSE needed

Sounds like the FDA does not work for your species. Better switch it off for now and see whether it works for your second species.

HIH,

Wilfried





> 
> I am pretty sure that there are no na values in my data using this command
>         sum(is.na(currentclim))
>         sum(is.na(species)) 
> in both cases I got 0 na values.
> 
> That is the code used to calibrate the models:
> Initial.State (Response = species[,1:2], Explanatory = currentclim, IndependentResponse = species[,1:2], IndependentExplanator y = currentclim)
>         Models(
>         GLM = T, TypeGLM = "poly", Test = "AIC",
>         GBM = T, No.trees = 2000,
>         GAM = T, Spline = 3,
>         CTA = F, CV.tree = 50,
>         ANN = T, CV.ann = 2,
>         SRE = T, quant=0.025,   # requires opening R with administrative previllages.
>         FDA = T,
>          MARS = T,
>         # RF = T,               
>         NbRunEval = 3, DataSplit = 75, Yweights=NULL, 
>         Roc = T, Optimized.Threshold.Roc = T, Kappa = T, TSS=T,
>         KeepPredIndependent = T, VarImport=5,
>         NbRepPA=0, strategy="circles", coor=latlong,
>         distance=0.125, nb.absences=1000)
> 
> 
> This is the results:
> ----------------------------------- 
> Modelling summar y 
> ----------------------------------- 
> Number of species modelled :            2
> sp1, sp2
> numerical variables :                   bio3, bio5, bio6, bio7, bio8, bio9, bio10, bio11, bio15, bio16, bio19
> number of evaluation repetitions :      3
> number of pseudo-absences runs :        0
> models selected :                       ANN, GAM, GBM, GLM, MARS, FDA, SRE
> total number of model runs :            56
> ----------------------------------- 
> #####                    sp1     ;                #####
> Model=Artificial Neural Network 
>          2 Fold Cross Validation + 3 Repetitions 
> Calibration and evaluation phase: Nb of cross-validations:  3 
> Evaluating Predictor Contributions in  ANN ... 
> Model=GAM spline 
>          3  Degrees of smoothing 
> Evaluating Predictor Contributions in  GAM ... 
> Model=Generalised Boosting Regression 
>          2000 maximum different trees and lambda Fold Cross-Validation 
> Evaluating Predictor Contributions in  GBM ... 
> Model=GLM polynomial + quadratic         Stepwise procedure using AIC criteria 
> Evaluating Pre dictor Contributions in  GLM ... 
> Model=Multiple Adaptive Regression Splines 
> Evaluating Predictor Contributions in  MARS ... 
> Model=Flexible Discriminant Analysis 
> Error in if (min(Fit) < 0) Fit[Fit < 0] <- 0 : 
>   missing value where TRUE/FALSE needed
> 
> 
> Thanks in advance,
> Ahmed
> _______________________________________________
> Biomod-commits mailing list
> Biomod-commits at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/biomod-commits

--------------------------
Dr. Wilfried Thuiller
Laboratoire d'Ecologie Alpine, UMR CNRS 5553
Université Joseph Fourier
BP53, 38041 Grenoble cedex 9, France
tel: +33 (0)4 76 51 44 97
fax: +33 (0)4 76 51 42 79

Email: wilfried.thuiller at ujf-grenoble.fr
Personal website: http://www.will.chez-alice.fr
Team website: http://www-leca.ujf-grenoble.fr/equipes/emabio.htm

ERC Starting Grant TEEMBIO project: http://www.will.chez-alice.fr/Research.html
FP6 European EcoChange project: http://www.ecochange-project.eu







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/biomod-commits/attachments/20120306/a25f16d7/attachment-0001.html>


More information about the Biomod-commits mailing list