Skip to content

lanzithinking/QePyTorch

Repository files navigation

QPyTorch Logo


Test Suite Documentation Status License

Python Version Conda PyPI

QPyTorch is a Python package for Q-exponential process (QEP) implemented using PyTorch and built upon GPyTorch. QPyTorch is designed to facilitate creating scalable, flexible, and modular QPE models.

Different from GPyTorch for Gaussian process (GP) models, QPyTorch focuses on QEP, which generalizes GP by allowing flexible regularization on function spaces through a parameter $q>0$ and embraces GP as a special case with $q=2$. QEP is proven to be superior than GP in modeling inhomogeneous objects with abrupt changes or sharp contrast for $q<2$ [Li et al (2023)]. Inherited from GPyTorch, QPyTorch has an efficient and scalable implementation by taking advantage of numerical linear algebra library LinearOperator and improved GPU utilization.

Tutorials, Examples, and Documentation

See documentation on how to construct various QEP models in QPyTorch.

Installation

Requirements:

  • Python >= 3.10
  • PyTorch >= 2.0
  • GPyTorch >= 1.14

Stable Version

Install QPyTorch using pip or conda:

pip install qpytorch
conda install qpytorch

(To use packages globally but install QPyTorch as a user-only package, use pip install --user above.)

Latest Version

To upgrade to the latest version, run

pip install --upgrade git+https://github.com/lanzithinking/qepytorch.git

from source (for development)

If you are contributing a pull request, it is best to perform a manual installation:

git clone https://github.com/lanzithinking/qepytorch.git
cd qepytorch
# either
pip install -e .[dev,docs,examples,keops,pyro,test]  # keops and pyro are optional
# or
conda env create -f env_install.yaml # installed in the environment qpytorch

Citing Us

If you use QPyTorch, please cite the following paper:

Li, Shuyi, Michael O'Connor, and Shiwei Lan. "Bayesian Learning via Q-Exponential Process." In Advances in Neural Information Processing Systems (2023).

@inproceedings{li2023QEP,
  title={Bayesian Learning via Q-Exponential Process},
  author={Li, Shuyi, Michael O'Connor, and Shiwei Lan},
  booktitle={Advances in Neural Information Processing Systems},
  year={2023}
}

Contributing

See the contributing guidelines CONTRIBUTING.md for information on submitting issues and pull requests.

The Team

QPyTorch is primarily maintained by:

Thanks to the following contributors including (but not limited to)

  • Shuyi Li, Guangting Yu, Zhi Chang, Chukwudi Paul Obite, Keyan Wu, and many more!

License

QPyTorch is MIT licensed.

About

A highly efficient implementation of Q-Exponential Processes in PyTorch based on GPyTorch

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages