Skip to content

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

License

Notifications You must be signed in to change notification settings

skbwu/Python-MAGI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Installation: pip install python-magi==0.0.4 or installing manually using the .whl or .tar.gz files in the dist directory.

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 [email protected] if you have any comments, suggestions, or concerns.

*Special appreciation to Nithin Kavi (Harvard '24) and Alexandru Lopotenco (Stanford Statistics) for their technical assistance.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published