rvalavi / blockCV

The blockCV package creates spatially or environmentally separated training and testing folds for cross-validation to provide a robust error estimation in spatially structured environments. See
https://doi.org/10.1111/2041-210X.13107
GNU General Public License v3.0
106 stars 22 forks source link

Error in DataSplitTable and Biomod2 #12

Closed vplima closed 4 years ago

vplima commented 4 years ago

Dear all, I created a 'dataSplitTable' for using as input in biomod2 using the spatialBlock function. However, I frequently find the following error when I try to calibrate the models: "Error in .Models.check.args(data, models, models.options, NbRunEval, DataSplit, : DataSplitTable must have as many rows (dim1) than your species as data". When I check the number of rows (dim) both have the same number. The big issue for me is that it has happened only with some species. Do you have any idea what it could be? Thanks in advance, Valdeir

rvalavi commented 4 years ago

As we discussed this via email, I close this issue.

If anyone's interested: The issue was that some of the species points were falling outside of the raster covariates and biomod removed them from the model, so the number of rows of the data and spatial blocks didn't match.