Closed anackr closed 4 months ago
Hi @anackr
Thanks for reporting the issue.
This error is actually due to some recent updates of biomod2
package. You can fix it by changing the name of the biomod_table
and also the name of arguments in the BIOMOD_Modeling
function (i.e., CV.strategy
and CV.user.table
):
colnames(spatial_cv_folds) <- paste0("_allData_RUN", 1:3)
modelo_maxent1 <- BIOMOD_Modeling(
bm.format = myBiomodData,
models = 'MAXENT',
bm.options = L1,
CV.strategy = "user.defined", # this is new argument
CV.user.table = spatial_cv_folds, # also this one is new
metric.eval = c('ROC', 'POD', 'TSS')
)
I will update the blockCV
's vignettes.
Forgot to thank you! It worked :)
Perfect! I'm glad it was helpful.
Hi everyone. I am using blockCV for biomod but was not able to make it run properly.
My data is on this link
Here is the code:
Create CV
Biomod
The following error appears:
_Error in .bmCrossValidation.check.args(bm.format = bm.format, strategy = strategy, : perc (or CV.perc) is required when strategy = 'random'
Here is my session info:
I know the error is about biomod, but I think it has something to do with the blockCV structure.
Could anyone help?
Thanks in advance!