Closed mengjiezhang4ds closed 2 months ago
Hello there,
In the sentence 661 presences, 0 true absences and 1827 undefined points in dataset
,
all the different pseudo-absences are taken into account.
Here, you take PA.nb.rep = 4
with PA.nb.absences = 1000
: four PA datasets will be selected but the PA points will not be identical.
So you have 1827 PA points but they are not all present in the four PA datasets. This number can change as they are selected randomly.
You can check with: summary(myBiomodData.r@PA.table)
You will have 661 (presences) + 1000 (PA points) = 1661 TRUE
for each datasets.
TheFALSE
points correspond to the PA points chosen for other PA datasets but are not present in this dataset.
It is the same logic with the other PA strategies.
Hope it's clearer this way, Hélène
Now I have set the number of PA
to 2000 and set the pseudo absence point dataset to 4, but the result shows only 1 PA dataset. Why is this?
myBiomodData.r <- BIOMOD_FormatingData(resp.var = myResp.PA,
expl.var = myExpl,
resp.xy = myRespXY,
resp.name = myRespName,
PA.nb.rep = 4,
PA.nb.absences = 2000,
PA.strategy = 'random')
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= GuloGulo Data Formating -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
! No data has been set aside for modeling evaluation
! No data has been set aside for modeling evaluation
Checking Pseudo-absence selection arguments...
! No data has been set aside for modeling evaluation
> random pseudo absences selection
> Pseudo absences are selected in explanatory variables
> All available cells have been selected ( 1827 cells )
! No data has been set aside for modeling evaluation
! No data has been set aside for modeling evaluation
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Done -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
as_tibble(myBiomodData.r@PA.table) %>%
pivot_longer(cols = everything(),names_to = "PA",values_to = "TF") %>%
group_by(PA,TF) %>%
summarise(n = n())
`summarise()` has grouped output by 'PA'. You can override using the `.groups` argument.
# A tibble: 1 × 3
# Groups: PA [1]
PA TF n
<chr> <lgl> <int>
1 PA1 TRUE 2488
Hi !
You should pay attention to this message :
> All available cells have been selected ( 1827 cells )
It shows that it is not possible to select 2000 PA points because there are only 1827 possible points.
In this case, there is only one possible PA dataset with all the points ( 661 + 1827 =2488 ).
So biomod2
will only create this dataset: a way of avoiding confusion with four identical data sets.
Hope it helps, Hélène
Okay, I noticed that I seem to have entered a dead end, so I've been keeping my eyes on the number of my PA
points. Thank you very much for your answer.
Context and question When I used the
BIOMOD_FormatingData
ofbiomod2
to generate several numbers of pseudo absence points, I found that the number of pseudo absence points displayed in the return code did not match the number I set. I am looking forward to your answer very much, thank you very much!Code used I am using the official case code, and I have pasted the code and output results below.
Here, I have set the generation of 1000 pseudo absence points in
PA.nb.absences
, and I have 661 real presence points. Therefore, the input model should have 661+1000=1661 points. However, the information returned by the code shows that 1827 pseudo absence points have been generated. So, is the parameterPA.nb.absences
useless? Or is there another reason why the number of points doesn't match?I am also puzzled by the results of other generation methods such as
disk
, but the number of points still does not match. Why is this?