Giter VIP home page Giter VIP logo

distreqx's Introduction

distreqx

Distrax + Equinox = distreqx. Easy Pytree probability distributions and bijectors.

distreqx (pronounced "dist-rex") is a JAX-based library providing implementations of distributions, bijectors, and tools for statistical and probabilistic machine learning with all benefits of jax (native GPU/TPU acceleration, differentiability, vectorization, distributing workloads, XLA compilation, etc.).

The origin of this repo is a reimplementation of distrax, (which is asubset of TensorFlow Probability (TFP), with some new features and emphasis on jax compatibility) using equinox. As a result, much of the original code/comments/documentation/tests are directly taken or adapted from distrax (original distrax copyright available at end of README.)

Current features include:

  • Probability distributions
  • Bijectors

Installation

git clone https://github.com/lockwo/distreqx.git
cd distreqx
pip install -e .

Requires Python 3.9+, JAX 0.4.11+, and Equinox 0.11.0+.

Documentation

Available at https://lockwo.github.io/distreqx/.

Quick example

from distreqx import

Differences with Distrax

  • No official support/interoperability with TFP
  • The concept of a batch dimension is dropped. If you want to operate on a batch, use vmap (note, this can be used in construction as well, e.g. vmaping the construction of a ScalarAffine)
  • Broader pytree enablement

Citation

If you found this library useful in academic research, please cite:

(Also consider starring the project on GitHub.)

See also: other libraries in the JAX ecosystem

GPJax: Gaussian processes in JAX. Optimistix: root finding, minimisation, fixed points, and least squares.
Lineax: linear solvers.
sympy2jax: SymPy<->JAX conversion; train symbolic expressions via gradient descent.
diffrax: numerical differential equation solvers in JAX. Autodifferentiable and GPU-capable. Awesome JAX: a longer list of other JAX projects.

Original distrax copyright

Copyright 2021 DeepMind Technologies Limited. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================

distreqx's People

Contributors

lockwo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.