Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spatially constrained priors? #258

Open
khufkens opened this issue Sep 11, 2023 · 3 comments
Open

Spatially constrained priors? #258

khufkens opened this issue Sep 11, 2023 · 3 comments

Comments

@khufkens
Copy link

Hi @florianhartig

Thanks again for this nice package, which has served me well in the past!

I was wondering if you know how to construct spatially constraint priors.

I'm using BT to fit a sky illuminance model to light logger data to retrieve spatial positions. However, depending on the species, the locations are spatially constrained to land. How would you go about this problem of creating a spatially constraint prior?

For reference, here is some underlying theory (still rough around the edges but it should give you an idea):
https://bluegreen-labs.github.io/skytrackr/articles/introduction.html

Currently I use a stepwise method where the previous location is used to define a bounding box of potential solutions (setting lower and upper bounds). While this is good this is not perfect, and gives issues as there are still "solutions" outside any reasonable domain.

https://github.com/bluegreen-labs/skytrackr

@florianhartig
Copy link
Owner

Hello Koen,

sorry that it took me so long to answer.

Regarding the prior: can't you just write in the prior: if not on land set likelihood -Inf or subtract a certain amount from the log likelihood (if you don't want to impose hard constraints)?

I also saw that you compared MCMC (DEzs) with an SMC - this makes sense, just wanted to note that there was an SMC in BT, but not a very good one, but we have worked on a more sophisticated SMC in

Speich, M., Dormann, C. F., & Hartig, F. (2021). Sequential Monte-Carlo algorithms for Bayesian model calibration–A review and method comparison✰. Ecological Modelling, 455, 109608.

The code for this SMC is still in the development branch, I still have to merge with the main branch. I thought this could be possibly of interest.

Best
Florian

@khufkens
Copy link
Author

Hi Florian,

No worries, this is just a side project, with low priority.
Will look into the suggested strategy - and will have a look at the dev branch as well !
Thanks for the pointers, will keep you posted!

Cheers,
K

@florianhartig
Copy link
Owner

ok, great. p.s.: I wrote likelihood but would be more logical to put this into the prior although technically there is no difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants