[Biomod-commits] RasterStack

César Capinha nrevistada at yahoo.co.uk
Mon Jul 5 18:05:45 CEST 2010


Hi all again,

Can someone provide a deeper insight on how to define and create the class 'RasterStack' needed to make the raster projections? 

Best of wishes,

César



--- On Mon, 5/7/10, biomod-commits-request at lists.r-forge.r-project.org <biomod-commits-request at lists.r-forge.r-project.org> wrote:

From: biomod-commits-request at lists.r-forge.r-project.org <biomod-commits-request at lists.r-forge.r-project.org>
Subject: Biomod-commits Digest, Vol 15, Issue 1
To: biomod-commits at lists.r-forge.r-project.org
Date: Monday, 5 July, 2010, 16:33

Send Biomod-commits mailing list submissions to
    biomod-commits at lists.r-forge.r-project.org

To subscribe or unsubscribe via the World Wide Web, visit
    https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/biomod-commits

or, via email, send a message with subject or body 'help' to
    biomod-commits-request at lists.r-forge.r-project.org

You can reach the person managing the list at
    biomod-commits-owner at lists.r-forge.r-project.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Biomod-commits digest..."


Today's Topics:

   1. new raster functions (C?sar Capinha)
   2. Re: new raster functions (Wilfried Thuiller)
   3. memory error- again... (PEP Serra Diaz)
   4. Re: memory error- again... (Wilfried Thuiller)


----------------------------------------------------------------------

Message: 1
Date: Mon, 5 Jul 2010 12:05:33 +0000 (GMT)
From: C?sar Capinha <nrevistada at yahoo.co.uk>
Subject: [Biomod-commits] new raster functions
To: biomod-commits at lists.r-forge.r-project.org
Message-ID: <394679.98688.qm at web27405.mail.ukl.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi all,

I'm trying to make some projections of predictions and I would very much benefit from using the new BIOMOD capabilities for projecting directly to raster files. Still, I've downloaded the latest version (windows) and it seems to come without the CHM helpfile. I'm not about the syntax of these new functions. 

Can someone provide insights on them?

Best Wishes,
C?sar Capinha



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/biomod-commits/attachments/20100705/7a728d20/attachment-0001.htm>

------------------------------

Message: 2
Date: Mon, 5 Jul 2010 14:16:10 +0200
From: Wilfried Thuiller <wilfried.thuiller at ujf-grenoble.fr>
Subject: Re: [Biomod-commits] new raster functions
To: C?sar Capinha <nrevistada at yahoo.co.uk>
Cc: biomod-commits at r-forge.wu-wien.ac.at
Message-ID: <36D7AE5F-2430-4A14-96AE-E81DCBE11A6E at ujf-grenoble.fr>
Content-Type: text/plain; charset="iso-8859-1"

Dear C?sar,
If you type this, does it work?

?Projection.raster

Wilfried


Le 5 juil. 2010 ? 14:05, C?sar Capinha a ?crit :

> Hi all,
> 
> I'm trying to make some projections of predictions and I would very much benefit from using the new BIOMOD capabilities for projecting directly to raster files. Still, I've downloaded the latest version (windows) and it seems to come without the CHM helpfile. I'm not about the syntax of these new functions. 
> 
> Can someone provide insights on them?
> 
> Best Wishes,
> C?sar Capinha
> 
> _______________________________________________
> 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
Home page: http://www.will.chez-alice.fr
Website: http://www-leca.ujf-grenoble.fr/equipes/tde.htm

FP6 European MACIS project: http://www.macis-project.net
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/20100705/55d7a47f/attachment-0001.htm>

------------------------------

Message: 3
Date: Mon, 05 Jul 2010 15:47:22 +0100
From: PEP Serra Diaz <Josep.Serra at uab.cat>
Subject: [Biomod-commits] memory error- again...
To: biomod-commits at r-forge.wu-wien.ac.at
Message-ID: <9e9e8098525c.4c31fe8a at uab.es>
Content-Type: text/plain; charset=us-ascii


Dear BIOMODers,

I have a hughe dataset (more or less 70000 rows) and the error is, of course: cannot allocate vector size of 459.1 MB. (I already increased memory.limt ()  )

In that huge DF many species are recorded, so I though creating a litle loop so I could go species by species and therefore would not load a huge dataset (Question 1- Is that making any sense?). In each species model, presences and absences are equaled, so we keep prevalence constant, and the strategy of PseudoA selection is SRE. (see script below)

For the first species (only 4500 presences) R retrieves this memory error when computing RF, which I cannot understand for a DF of 9000 rows (P+A), and I even the number of repetitions is set to 1.

Secondly, I checked that BIOMOD creates an object: Biomod.PA.data with 40000 records aprox. I assume that these are the presences and the ALL absences selected outside the SurfaceRange (strategy selected), and later on BIOMOD will select the number of absences indicated (=Number of Presences in this case). Question 2- Is this correct or is it loading ALL absences outside the range? (maybe that's why it retrieves an error.) 

Question 3- Any suggestion?

# i corresponds to the column where the species Presence or Absence is located

for (i in "spColumID") {

Initial.State (Response=Sp.Env[,i], Explanatory=Sp.Env[,c(250,248,251,199,164,181)],IndependentResponse=NULL, IndependentExplanatory=NULL,sp.name=names[i])

Models(GLM = T, TypeGLM = "quad", Test = "AIC", GBM = T, No.trees = 3000, GAM = T, Spline=2, CTA = T, CV.tree = 50, ANN = T, CV.ann = 2, SRE = F, FDA = T, MARS = T, RF = T, NbRunEval = 1, DataSplit = 70, Yweights=NULL, Roc=T, Optimized.Threshold.Roc=T, Kappa=T, TSS=T, KeepPredIndependent = F, VarImport=5, NbRepPA=1, strategy="sre", coor=Coor, distance=2, nb.absences=sum(Sp.Env[,i]))

}


Thank you very much in advance for reading such a long post with 3 Questions!

Pep




------------------------------

Message: 4
Date: Mon, 5 Jul 2010 17:33:32 +0200
From: Wilfried Thuiller <wilfried.thuiller at ujf-grenoble.fr>
Subject: Re: [Biomod-commits] memory error- again...
To: PEP Serra Diaz <Josep.Serra at uab.cat>
Cc: biomod-commits at r-forge.wu-wien.ac.at
Message-ID: <096790AC-CF60-4B41-872F-ED5A12F4BF80 at ujf-grenoble.fr>
Content-Type: text/plain; charset="iso-8859-1"

Dear Pep,

> In that huge DF many species are recorded, so I though creating a litle loop so I could go species by species and therefore would not load a huge dataset (Question 1- Is that making any sense?). In each species model, presences and absences are equaled, so we keep prevalence constant, and the strategy of PseudoA selection is SRE. (see script below)

It does make sense to run BIOMOD species by species. This what I am usually doing when using grid systems. 

> For the first species (only 4500 presences) R retrieves this memory error when computing RF, which I cannot understand for a DF of 9000 rows (P+A), and I even the number of repetitions is set to 1.
> 
> Secondly, I checked that BIOMOD creates an object: Biomod.PA.data with 40000 records aprox. I assume that these are the presences and the ALL absences selected outside the SurfaceRange (strategy selected), and later on BIOMOD will select the number of absences indicated (=Number of Presences in this case). Question 2- Is this correct or is it loading ALL absences outside the range? (maybe that's why it retrieves an error.) 

However, it will much more powerful to also create a workspace and data folder to store the results for each species. 


More information about the Biomod-commits mailing list