Skip to main content

Python-MAGI: A TensorFlow Probability-Powered Upgraded Implementation of MAnifold-Constrained Gaussian Process Inference (MAGI)

Project description

Python-MAGI

A TensorFlow Probability-Powered Upgraded Implementation of Manifold-Constrained Gaussian Process Inference (MAGI).

This package is an upgraded version of the MAGI algorithm developed by Yang et al. (2020) for solving the ordinary differential equation (ODE) dynamical system inverse problem. Compared to the original MAGI implementation, this version is based in TensorFlow Probability and includes higher-performance routines for completely-missing components and GPU-accelerated MCMC sampling. The package is designed to be essentially hyperparameter-tuning-free, as it uses Hoffman & Gelman's No U-Turn Sampler with Dual-Averaging Stepsize Adaptation, all natively-implemented in TensorFlow Probability.

The main MAGI class was written to roughly mirror scikit-learn grammar for user-friendliness, with some minor modifications. Please see our vignette for a quick start guide.

High-Level Description of Core Functions: please see the complete source code at magi.py for full details.

  • __init__: constructor where the governing ODE equations f_vec, (potentially partially-observed) timesteps ts_obs and noisy observations X_obs, and computational settings (e.g., number of components in system, bandmatrix approximations) are specified to create a MAGI object.
  • initial_fit: fits the initial Matern kernel hyperparameters for the ODE inverse problem. Can take user-specified subsets of hyperparameters, too, and automatically accounts for missing observations and/or entirely-missing components in the provided noisy observed data.
  • predict: after receiving and/or fitting Matern kernel hyperparameters to the provided data, returns samples from the posterior distribution of the entire system along with diagnostics.

Please contact skylerw@stanford.edu if you have any comments, suggestions, or concerns.

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

python_magi-0.0.4.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

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

python_magi-0.0.4-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file python_magi-0.0.4.tar.gz.

File metadata

  • Download URL: python_magi-0.0.4.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.14

File hashes

Hashes for python_magi-0.0.4.tar.gz
Algorithm Hash digest
SHA256 587731ac518e395ca9c9ef48b7c086c77ed28ee876231310868aa5682d1f1ad7
MD5 8cc914fe54abdbd155a613f233e6c255
BLAKE2b-256 aa6b9f2be48d8d9de3547ca8dd820cc975b348b9499dda12a03671ea50f5b38e

See more details on using hashes here.

File details

Details for the file python_magi-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: python_magi-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.14

File hashes

Hashes for python_magi-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f068322cf3b4e46896b92e7af6acd9cfccc562505f6405ddc8c9b2c663a0aafe
MD5 83b2d660b0990ced6dbd2a2b0c1f9404
BLAKE2b-256 f888713334928c00cdbc1dd9dde22c7655d758fafe0def6e1a2b3ba1938537ab

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