Skip to main content

Fast Gaussian processes regression in O(n log n)

Project description

FastGPs: Fast Gaussian Process Regression in Python

Docs Tests

Gaussian process regression (GPR) on $n$ data points typically costs $\mathcal{O}(n^3)$ computations and $\mathcal{O}(n^2)$ storage. Fast GPR only costs $\mathcal{O}(n \log n)$ computations and $\mathcal{O}(n)$ storage by forcing nice structure into the $n \times n$ Gram matrix of pairwise kernel evaluations. Fast GPR requires

  1. control over the design of experiments, i.e., sampling at fixed locations, and
  2. Using special kernel forms that are practically performant but generally uncommon, e.g., one cannot use common kernels such as the Squared Exponential, Matern, or Rational Quadratic.

Installation

pip install fastgps

Resources

The FastGPs documentation contains a detailed package reference documenting classes including thorough doctests. A number of example notebooks are also rendered into the documentation from fastgps/docs/examples/. We recommend reading Aleksei Sorokin's slides on Fast GPR which he presented at MCM 2025 Chicago.

Fast GPR Methods

We currently support two flavors of fast GPR:

  1. Pairing integration lattice point sets with shift-invariant (SI) kernels which creates circulant Gram matrices that are diagonalizable by Fast Fourier Transforms (FFTs). SI kernels are periodic and arbitrarily smooth.
  2. Pairing digital nets (e.g. Sobol' point sets) with digitally-shift-invariant (DSI) kernels which creates Gram matrices diagonalizable by Fast Walsh Hadamard Transforms (FWHTs). DSI kernels are discontinuous, yet versions exist for which the corresponding Reproducing Kernel Hilbert Space (RKHSs) contains arbitrarily smooth functions.

Software Features

A reference standard GP implementation is available alongside the fast GPR implementations. All GPR methods support:

  • GPU computations as FastGPs is built on the PyTorch stack.
  • Batching of both outputs (for functions with tensor outputs) and parameters (with flexibly shareable parameters among batched outputs).
  • Multi-Task GPs with product kernels and generalized fast multi-task GPR.
  • Derivative Information of arbitrarily high order.
  • Bayesian Cubature for approximating integrals or expectations.
  • Flexible kernel parameterizations from the QMCPy package.
  • Efficient variance projections for determining if and where to sample next.

References

This package is based off of the following publications

  1. Jagadeeswaran, Rathinavel, and Fred J. Hickernell. "Fast automatic Bayesian cubature using lattice sampling." Statistics and Computing 29.6 (2019): 1215-1229.

  2. Jagadeeswaran, Rathinavel, and Fred J. Hickernell. "Fast automatic Bayesian cubature using Sobol’ sampling." Advances in Modeling and Simulation: Festschrift for Pierre L'Ecuyer. Cham: Springer International Publishing, 2022. 301-318.

  3. Rathinavel, Jagadeeswaran. Fast automatic Bayesian cubature using matching kernels and designs. Illinois Institute of Technology, 2019.

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

fastgps-1.0.0.1b2.tar.gz (27.1 kB view details)

Uploaded Source

Built Distribution

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

fastgps-1.0.0.1b2-py3-none-any.whl (32.5 kB view details)

Uploaded Python 3

File details

Details for the file fastgps-1.0.0.1b2.tar.gz.

File metadata

  • Download URL: fastgps-1.0.0.1b2.tar.gz
  • Upload date:
  • Size: 27.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.24.1 CPython/3.13.6 Darwin/24.5.0

File hashes

Hashes for fastgps-1.0.0.1b2.tar.gz
Algorithm Hash digest
SHA256 8ab2f07d1ce38899e87ac6af17628d1bb2e1c44b76d7fc0b4696d3c2ce7412a5
MD5 87f6d4b4a612bc5f5bd259548efa5b4e
BLAKE2b-256 fe8b1ecdf03f5ef32083da890e10ca14d192e3b6bab66a9638b53013bd8184c8

See more details on using hashes here.

File details

Details for the file fastgps-1.0.0.1b2-py3-none-any.whl.

File metadata

  • Download URL: fastgps-1.0.0.1b2-py3-none-any.whl
  • Upload date:
  • Size: 32.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.24.1 CPython/3.13.6 Darwin/24.5.0

File hashes

Hashes for fastgps-1.0.0.1b2-py3-none-any.whl
Algorithm Hash digest
SHA256 c0bbefe9d22e8bf76fb9b17e09a44ccb3d9022c23b895412a2aea94fe102447c
MD5 d4bae9155e079be77b68c7cdeaf006c5
BLAKE2b-256 4826593c5bfd7bf9f86030687af7d33b7a8226968338831668c89391d9abf1c5

See more details on using hashes here.

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