Comments (6)
I've added a gist here:
https://gist.github.com/simonrolph/d38d2d5a56a95782786a04f7178bdb34
I have added a CRS (wgs84) to all the layers now (I think) but I still get the error. However if I use xgboost then it works fine.
from ibis.isdm.
Thanks Martin! Yes I think it was my library being out of date because it works fine now. Assertion messages look useful too
from ibis.isdm.
Ok bear with, I also get the error if I add a CRS
> print(mod)
<Biodiversity distribution model>
Background extent:
xmin: -1.5, xmax: 53,
ymin: 0, ymax: 54
projection: +proj=longlat +datum=WGS84 +no_defs
---------
Biodiversity data:
Point - Presence only <173 records>
---------
predictors: env1, env2, env3 (3 predictors)
priors: <Default>
latent: None
log: <Console>
engine: <INLABRU>
>
> plot(mod$biodiversity)
>
>
> fit <- train(mod,
+ runname = "Test INLA run",
+ verbose = T #
+ )
[Estimation] 2023-08-16 10:04:48 | Collecting input parameters.
[Estimation] 2023-08-16 10:04:50 | Adding engine-specific parameters.
Error in if (sf::st_is_longlat(bdry$crs)) { :
missing value where TRUE/FALSE needed
from ibis.isdm.
Hi, Thanks a lot for reporting!
Happy to update the error message to be more informative, can you paste me the code for the virtualspecies/NLM package so I can recreate the error? (or upload the testing files). Generally the background and the predictors should all be in similar extent and crs, but maybe there is also something that can be improved (e.g. assign the CRS to the background if missing).
M
from ibis.isdm.
So the error is occurring here:
Line 197 in e3f658c
from ibis.isdm.
Hi Simon,
Thanks, I tested your gist script and it works without issues for me (my SessionInfo below). So could you please run ibis_dependencies()
just to be sure that you use the latest packages (from what I can eyeball hot candidates are also sp
and sf
which you might need to update).
I have also added a bunch of more user friendly assertion messages that are now being raised with a provided background in distribution()
, which should always have a CRS. Also added specific minimum dependencies to the description.
I pushed a new commit to the dev branch adding this (version 0.0.8, 1da5dc7).
Note: Generally the INLA implementation might need some love soon as it is currently still partly based on a mix of sp
/sf
and some of the code will deprecate soon'ish.
Session info on my test instance
> sessionInfo()
R version 4.2.3 (2023-03-15 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22621)
Matrix products: default
locale:
[1] LC_COLLATE=English_United Kingdom.utf8 LC_CTYPE=English_United Kingdom.utf8
[3] LC_MONETARY=English_United Kingdom.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.utf8
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] sf_1.0-14 assertthat_0.2.1 uuid_1.1-0 terra_1.7-39 xgboost_1.7.5.1
[6] inlabru_2.8.0 INLA_23.04.24 foreach_1.5.2 Matrix_1.6-0 ibis.iSDM_0.0.8
[11] tidyr_1.3.0 dplyr_1.1.2 virtualspecies_1.5.1 raster_3.6-23 sp_2.0-0
[16] NLMR_1.1.1
loaded via a namespace (and not attached):
[1] Rcpp_1.0.11 pillar_1.9.0 compiler_4.2.3 iterators_1.0.14 class_7.3-21
[6] tools_4.2.3 jsonlite_1.8.7 lifecycle_1.0.3 tibble_3.2.1 lattice_0.20-45
[11] pkgconfig_2.0.3 rlang_1.1.1 cli_3.6.1 DBI_1.1.3 rstudioapi_0.15.0
[16] xfun_0.39 proto_1.0.0 e1071_1.7-13 knitr_1.43 generics_0.1.3
[21] vctrs_0.6.3 classInt_0.4-9 grid_4.2.3 tidyselect_1.2.0 data.table_1.14.8
[26] glue_1.6.2 R6_2.5.1 fansi_1.0.4 purrr_1.0.1 magrittr_2.0.3
[31] splines_4.2.3 codetools_0.2-19 units_0.8-3 utf8_1.2.3 KernSmooth_2.23-20
[36] proxy_0.4-27
from ibis.isdm.
Related Issues (20)
- integrated SDM predicts near-zeros across most of study area HOT 6
- Question: How to make predictions over smaller spatial domain, or on a new set of predictor rasters. HOT 5
- Issue with GDP priors and custom formula HOT 5
- Issue with `project()` when used with integrated model HOT 9
- Issue with BREG priors and custom formula HOT 1
- Writing `stars` or scenario outputs with multiple variables still buggy/only partially working HOT 1
- Help with Data Integration and an issue related to the background layer
- Predictor transformations for scenario covariates need to take contemporary ranges into account! HOT 1
- Speed for `ensemble(scenarioproj,...)` is rather slow
- Potential issue if more than 2 similar models are integrated as predictors HOT 3
- Using several Biodiversity datasets and predictor integration
- Support for constraining future scenarios with zones dynamically
- Invalid output when using 'add_biodiversity_poipo' HOT 8
- Error with threshold on engine_glm and method using "modEvA" HOT 2
- [Scenario] Check and enable support for backcasting
- Factor variables are not correctly handled anymore HOT 7
- Error with `train()` when using INLA with `add_biodiversity_poipa()` and weights HOT 7
- Extracting pseudo-absences HOT 6
- Importing of terra and sf HOT 1
- Prediction raster from `train()` does not spatially conform with `distribution()` background HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ibis.isdm.