Comments (5)
This is related to the mesh that INLA/INLABRU uses to predict into space. For all (most?) other engines the spatial dimensions are exactly the same.
Not sure it's possible to force INLA/INLABRU to use a mesh with exactly the same characteristics...
from ibis.isdm.
Ah, I see - thanks for explaining that! To ensure that I can get model predictions at a particular resolution and spatial extent, would you recommend resampling the data to a finer resolution prior to model fitting? Or manually specifying the mesh?
from ibis.isdm.
Just to follow up, I've found that using something like this (see code below) tends to produce rasters with approximately the correct the spatial resolution so that I can subsequently resample the output prediction raster to match the original background raster.
ibis.iSDM::engine_inlabru(x, proj_stepsize = max(terra::res(bg_data)) * 0.85)
Although this increases the overall computatio time quite a bit, does this seem like a reasonable solution?
from ibis.isdm.
INLA does not use the predictor covariates to create the prediction output frame, but makes predictions on the created (if parameters are supplied) or provided (if directly passed on) mesh. A gridded prediction is only created afterwards by essentially turning each mesh node back into a gridded surface (linearly interpolating per unit stepsize). This unfortunately can result to mismatches with the original covariate spatial resolution.
Changing the stepsize can be a way but I would guess this is quite problem/dataset dependent and hard to find a golden rule there... Generally you would want a fine mesh with many nodes particular where your data is distributed which unfortunately is almost always linked to higher computational effort.
The mesh can be checked via plot( model$engine$data$mesh )
and I think there was also an in INLA function to build meshes (INLA::INLA::meshbuilder()
).
Note: The denseness and location of mesh nodes has been shown to affect predictions, so the choice of creating a mesh is ultimately a parameter choice and left to users. See Dambly et al.
My recommendation if INLA is heavily used would be to create a 'default' reasonably fine mesh a priori and then supply this mesh to all predictions via engine_inlabru(optional_mesh = mymesh)
.
There is also build-in convenience functions for aligning/resampling grids which in cases where the prediction is larger might help sometimes (alignRasters(layer, templater) )
).
from ibis.isdm.
Ah I see - thank you very much for explaining all that @Martin-Jung!
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
- INLA/INLABRU engines option
- Integration several datasets HOT 5
- Partial (and spartial) calculations of glmnet seem to ignore lambda
- Improvements thin_observations HOT 2
- Implemement a (Deep) Neural Network as engine in ibis
- Support for compositing of threshold values via `ensemble`
- Convenience function to support a PCA based Niche overview as graphical plot HOT 5
- Implement spatial block-validation in `ibis.iSDM` ?
- Error with `distribution()` if `getOption("ibis.setupmessages")` is NULL HOT 6
- Unclear warning log message with `distribution()` HOT 4
- Possible typo in FAQ HOT 1
- 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
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.