Skip to main content

Bayesian Spatiotemporal Point Process

Project description

## Bayesian Spatiotemporal Point Process

This package provides bayesian inference for three spatiotemporal point process models with or without spatial covariates: - Log Gaussian Cox Process (lgcp) - Hawkes Process - Cox Hawkes Process

### Usage

Install with `pip install git+https://github.com/imanring/BSTPP.git`

API documentation is in `bstpp_API_doc.pdf`.

See `demo.ipynb` for a demo.

### Model Details

The full Cox Hawkes Model is formulated as follows,

$lambda(t,s) = mu(t,s) + sum_{i:t_i < t}{alpha f(t-t_i;beta) varphi(s-s_i;sigma)}$

$f$ by default is the exponential density and $varphi$ by default is the normal density.

$mu(t,s) = exp(a_0 + X(s)w + f_s(s) + f_t(t))$

$X(s)$ is the spatial covariate matrix, and $f_s$ and $f_t$ are gaussian processes.

The Hawkes process is the same with the as the Cox Hawkes, except the background is

$mu(t,s) = exp(a_0 + X(s)w)$

Finally, the Log Gaussian Cox Process is the same as Cox Hawkes except without the self-exciting summation,

$lambda(t,s) = exp(a_0 + X(s)w + f_s(s) + f_t(t))$

### Acknowledgements

This repo is based on code from [1]. The trained decoders and encoder/decoder functions are provided by Dr Elisaveta Semenova following the proposals in [2].

[1] X. Miscouridou, G. Mohler, S. Bhatt, S. Flaxman, S. Mishra, Cox-Hawkes: Doubly stochastic spatiotemporal poisson point process, Transaction of Machine Learning Research, 2023

[2] Elizaveta Semenova, Yidan Xu, Adam Howes, Theo Rashid, Samir Bhatt, B. Swapnil Mishra, and Seth R. Flaxman. Priorvae: encoding spatial priors with variational autoencoders for small-area estimation. Royal Society Publishing, pp. 73–80, 2022

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

BSTPP-0.1.tar.gz (2.2 MB view details)

Uploaded Source

Built Distributions

BSTPP-0.1.0-py3-none-any.whl (2.2 MB view details)

Uploaded Python 3

BSTPP-0.1-py3-none-any.whl (2.2 MB view details)

Uploaded Python 3

File details

Details for the file BSTPP-0.1.tar.gz.

File metadata

  • Download URL: BSTPP-0.1.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for BSTPP-0.1.tar.gz
Algorithm Hash digest
SHA256 12c9085d5e89cbefba4641a76e8d5c132390b128d1585d9f537d422602b64ed4
MD5 47e1a4636ad65636a4c09a0b236ce220
BLAKE2b-256 1068fbbf82e981e3a68dfcdb3845a2a3d2678d5f7e95e5a8d2f780e2d6d7bd64

See more details on using hashes here.

File details

Details for the file BSTPP-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: BSTPP-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for BSTPP-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c8cfebc4087d08c4b58bdca11befb0cf2f36a33e2f15c596e22573da90e7d3a
MD5 7b00a8147330c6224a5fd4219029a08f
BLAKE2b-256 102266e0d48db885a6d69d48ba74d94fe6604a502d4f09e4ffbe9fa2a39c09cf

See more details on using hashes here.

File details

Details for the file BSTPP-0.1-py3-none-any.whl.

File metadata

  • Download URL: BSTPP-0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for BSTPP-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 29ebe46711667f43ac870b47dfe7eedc8c865409feb2d68b047bffbd9b3bdac8
MD5 a19919af406b3b26ef29cacb62b8aecf
BLAKE2b-256 586d3c11a8916769e69be7f3c169130968a529bf0a1d9497305ddc37fd5feb21

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page