Skip to main content

An open source library for building and performing inference with probabilistic graphical models.

Project description

Installation

For installing through pip:

pip install veroku

To clone this git repo:

git clone https://github.com/ejlouw/veroku.git 
cd veroku/
pip install -r requirements.txt

It is recommended to use a separate conda virtual environment when installing the dependencies, to avoid interfering with existing packages. To get started with conda environments, see the installation guide. For more information on using conda environments see managing environments guide

Overview

Veroku is an open source library for building and performing inference with probabilistic graphical models (PGMs) in python. PGMs provide a framework for performing efficient probabilistic inference with very high dimensional distributions. A typical example of a well-known type of PGM is the Kalman filter that can be used to obtain probabilistic estimates of a hidden state of a process or system, given noisy measurements. PGMs can in principle be used for any problem that involves uncertainty and is therefore applicable to many problems.

Veroku currently supports the following probability distributions:

  • Categorical (sparse and dense implementations)
  • Gaussian
  • Gaussian mixture1
  • Linear Gaussian2
  • Non-linear Gaussian3

1 This class still has some experimental functionality (specifically the Gaussian mixture division methods) and is, therefore, still in the factors.experimental sub-package.
2 Using the Gaussian class - see the Kalman filter example notebook.
3This implementation is still experimental (see the factors.experimental sub-package).

These distributions can be used as factors to represent a factorised distribution. These factors can be used, together with the `cluster_graph` module to automatically create valid cluster graphs. Inference can be performed in these graphs using message passing algorithms. Currently only the LBU (Loopy Belief Update) message-passing algorithm is supported.

Example notebooks:

On the Roadmap

The following distributions, models and features are on the roadmap to be added to veroku:

  • Conditional Gaussian
  • Dirichlet distribution
  • Wishart distribution
  • Normal-Wishart distribution
  • Plate models
  • Structure Learning
  • Causal Inference

Dependencies

For the python dependencies see the requirements file. The following additional dependencies are also required for some functionality (these are not installed automatically with the pip install):

Graphviz

See https://graphviz.org/download/ for installation instructions.

Contributing

If you would like to contribute to veroku, the TODO's in the code are a good place to start. There are a some very simple ones, but also a few more complex ones. Another area where contributions will be valuable is in the completion and refinement of the experimental modules and writing tests for these modules. Another potential area for contribution would be the items on the roadmap, although it would be best if the experimental modules are first rounded off.

This project uses gitflow for branch management. Below is a summary of how to make a contribution to this project using the gitflow process:

  • Fork this repository to your own GitHub account.
  • Clone the forked repository to make it available locally.
  • Switch to the dev branch (git checkout dev) and branch of of this branch to create your new feature branch (git checkout -b feature/<your-feature-name>).
  • Make changes and add features, commit these changes when done and push the changes to your GitHub repo.
  • Create a pull request to request that your changes be added to veroku.

In general, please remember to ensure that the following guidelines are followed when contributing:

  • Run pylint ./veroku from the project root to ensure that there are no code style issues (this will cause the actions pipeline to fail)
  • The use of pylint disable statements should be reserved only for special cases and are not generally acceptable.
  • Add tests for any contributions ( this will also prevent the build from failing on the code coverage check).
  • Run all tests before pushing.

License

Veroku is released under a 3-Clause BSD license. You can view the license here.

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

veroku-1.0.113.tar.gz (165.3 kB view hashes)

Uploaded Source

Built Distribution

veroku-1.0.113-py3-none-any.whl (94.3 kB view hashes)

Uploaded Python 3

Supported by

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