Skip to main content

Spatial Debiased Whittle likelihood for fast inference of spatio-temporal covariance models from gridded data

Project description

Spatial Debiased Whittle Likelihood

Image

Documentation Status .github/workflows/run_tests_on_push.yaml Pypi Binder DOI

Introduction

This package implements the Spatial Debiased Whittle Likelihood (SDW) as presented in the article of the same name, by the following authors:

  • Arthur P. Guillaumin
  • Adam M. Sykulski
  • Sofia C. Olhede
  • Frederik J. Simons

Additionally, the following people have greatly contributed to further developments of the method and its implementation:

  • Thomas Goodwin
  • Olivia L. Walbert

The overall structure of the package has also greatly improved thanks to suggestions made by reviewers @MarineChap and @weiji14 for publication in the Journal of Open Source Software.

The SDW extends ideas from the Whittle likelihood and Debiased Whittle Likelihood to random fields and spatio-temporal data. In particular, it directly addresses the bias issue of the Whittle likelihood for observation domains with dimension greater than 2. It also allows us to work with rectangular domains (i.e., rather than square), missing observations, and complex shapes of data.

The documentation is available here.

Installation instructions

CPU-only

The package can be installed via one of the following methods.

  1. Via the use of Poetry, by running the following command:

    poetry add debiased-spatial-whittle
    
  2. Otherwise, you can directly install via pip:

    pip install debiased-spatial-whittle
    

GPU

The Debiased Spatial Whittle likelihood relies on the Fast Fourier Transform (FFT) for computational efficiency. GPU implementations of the FFT provide additional computational efficiency (order x100) at almost no additional cost thanks to GPU implementations of the FFT algorithm.

If you want to install with GPU dependencies (Cupy and Pytorch):

  1. You need an NVIDIA GPU

  2. You need to install the CUDA Toolkit. See for instance Cupy's installation page.

  3. You can install Cupy or pytorch yourself in your environment. Or you can specify an extra to poetry, e.g.

    poetry add debiased-spatial-whittle -E gpu12
    

    if you version of the CUDA toolkit is 12.* (use gpu11 if your version is 11.*)

One way to check your CUDA version is to run the following command in a terminal:

   nvidia-smi

You can then switch to using e.g. Cupy instead of numpy as the backend via:

 from debiased_spatial_whittle.backend import BackendManager
 BackendManager.set_backend("cupy")

This should be run before any other import from the debiased_spatial_whittle package.

PyPI

The package is updated on PyPi automatically on creation of a new release in Github. Note that currently the version in pyproject.toml needs to be manually updated. This should be fixed by adding a step in the workflow used for publication to Pypi.

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

debiased_spatial_whittle-2.2.0.tar.gz (74.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

debiased_spatial_whittle-2.2.0-py3-none-any.whl (83.7 kB view details)

Uploaded Python 3

File details

Details for the file debiased_spatial_whittle-2.2.0.tar.gz.

File metadata

  • Download URL: debiased_spatial_whittle-2.2.0.tar.gz
  • Upload date:
  • Size: 74.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for debiased_spatial_whittle-2.2.0.tar.gz
Algorithm Hash digest
SHA256 ea712c0200713d98b9af69ece9fc02bd5af668afe5ded7f9a7e72b420bf1defe
MD5 8d3f4bb0ca99517eea36c2e5e93715c6
BLAKE2b-256 b759dda0d0f56b2aee1527cbce7895ae43d86cc24f9ba1e9e28dc57cbc4a49b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for debiased_spatial_whittle-2.2.0.tar.gz:

Publisher: pypi.yml on arthurBarthe/debiased-spatial-whittle

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file debiased_spatial_whittle-2.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for debiased_spatial_whittle-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b35e561acba3d1ffddefccd760f812e4ce33ffe1b055a0bfd15647b95db5c795
MD5 3520367be0a2dfad386436ebae5cdbdf
BLAKE2b-256 93777e0fd932d465b23246e9012d5d0c3c22a343a3000b6e805d786f3f5f8f92

See more details on using hashes here.

Provenance

The following attestation bundles were made for debiased_spatial_whittle-2.2.0-py3-none-any.whl:

Publisher: pypi.yml on arthurBarthe/debiased-spatial-whittle

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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