SCM

Forum: help

Monitor Forum | Start New Thread Start New Thread
RE: External Evaluation in BIOMOD2 and selection of Pseudo absences. [ Reply ]
By: Kjirsten Coleman on 2022-10-05 17:58
[forum:49457]
Hi Damien and community,

I am having a similar issue. I am adding some independent validation data and so will be using the three eval. arguments in the BIOMOD_FormattingData function. I have used NA values to represent background points (I do not have absences) and 1 to represent presence values. I have checked to be sure that no other columns contain NAs, however I get the following error message:

> Pseudo absences used will be user defined ones !
! NAs have been automatically removed from Evaluation dataError in .BIOMOD_FormatingData.check.args(resp.name, resp.var, expl.var, :
Evaluation response data must have both presences and absences

But the absences must be NA (which represents indeterminate background points) and here it seems the function has removed my NA values which were a part of the model format.

Note that without the independent validation arguments, and instead using cross-validation, the model works fine and I do not get this error. Given that the independent data is just a subset of the main dataframe and is in the same structure, this seems like a bug, unless you have any ideas for a solution?

Thank you!
Kjirsten

RE: External Evaluation in BIOMOD2 and selection of Pseudo absences. [ Reply ]
By: damien georges on 2020-04-06 13:57
[forum:47539]
Hi,

Models requires both presences and absences to be computed.
If your work with presence only data you have to generate pseudo absences.

Hope that helps,
Damien

External Evaluation in BIOMOD2 and selection of Pseudo absences. [ Reply ]
By: Jean Purdon on 2020-03-24 12:06
[forum:47532]
When using this code

myBiomodData <- BIOMOD_FormatingData(resp.var = rep(1, nrow(BWsummerTraindata)),
expl.var = climate,
resp.xy = BWsummerTraindata[, c("Longitude", "Latitude")],
resp.name = "BWsummer",
eval.resp.var = rep(1, nrow(BWsummerTestdata)),
eval.expl.var = climate,
eval.resp.xy = BWsummerTestdata[, c("Longitude", "Latitude")],
PA.nb.rep = 5,
PA.nb.absences = 500,
PA.strategy = 'random',
PA.dist.min = NULL,
PA.dist.max = NULL,
PA.sre.quant = NULL,
PA.table = NULL)

I get the following error

Error in .BIOMOD_FormatingData.check.args(resp.var, expl.var, resp.xy, : Evaluation response data must have both presences and absences

When using the eval.resp.var for the use of data for external evaluation how do I select pseudo absences? Does the PA.nb.absences command not work for both external evaluation data and the actual training data?

Thanks to:
Vienna University of Economics and Business Powered By FusionForge