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

Add periodic kernel support #14

Closed
jr-leary7 opened this issue Mar 1, 2025 · 0 comments
Closed

Add periodic kernel support #14

jr-leary7 opened this issue Mar 1, 2025 · 0 comments

Comments

@jr-leary7
Copy link
Owner

i'm intuiting a bit, but i think the periodic kernel could be appropriate for tissues where there are repeating spatial patterns e.g., the pancreas, colon, etc. instead of well-defined, non-repeating patterns like the brain. the periodic kernel is defined as:

$$ k(x, x^\prime) = \exp\left(-\frac{2\sin^2\left(\frac{\pi||x - x^\prime||}{p}\right)}{\ell^2}\right) $$

where $p$ is the period of the kernel and $\ell$ is the length-scale of the approximate GP. this can be easily pre-computed in R and then passed to Stan.

good values of $p$ depend on the resolution of the spatial dataset i.e., roughly equal to the typical inter-spot distance or perhaps a small multiple of it. ergo, the default should be maybe $50-100$, though the user should really set this parameter since spatial resolution varies wildly between technologies.

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

1 participant