Code Monkey home page Code Monkey logo

jaxampler's Introduction

Jaxampler ๐Ÿงช - A JAX-based statistical sampling toolkit

Python package Upload Python Package CodeQL

PyPI version Versions

Important

๐Ÿ“ฃ As of April 2024 I recommends that new projects should adopt NumPyro instead of Jaxampler. ๐Ÿ“ฃ

At the time of writing NumPyro has a larger and more active development team and more adoption with users. It has more extensive documentation, examples and an active community creating end to end examples.

Jaxampler will be a public archive but I have no plans to take it down from PyPI public repositories.

Jaxampler ๐Ÿงช is a statistical sampling toolkit built on top of JAX. It provides a set of high-performance sampling algorithms for a wide range of statistical distributions. Jaxampler is designed to be easy to use and integrate with existing JAX workflows. It is also designed to be extensible, allowing users to easily add new sampling algorithms and statistical distributions.

Jaxampler is currently in the early stages of development and is not yet ready for production use. However, we welcome contributions from the community to help us improve the library. If you are interested in contributing, please refer to our contribution guidelines.

Features

  • ๐Ÿš€ High-Performance Sampling: Leverage the power of JAX for high-speed, accurate sampling.
  • ๐Ÿงฉ Versatile Algorithms: A wide range of sampling methods to suit various applications.
  • ๐Ÿ”— Easy Integration: Seamlessly integrates with existing JAX workflows.

Install

You may install the latest released version of Jaxampler through pip by doing

pip3 install --upgrade jaxampler

You may install the bleeding edge version by cloning this repo or doing

pip3 install --upgrade git+https://github.com/Qazalbash/jaxampler

If you would like to take advantage of CUDA, you will additionally need to install a specific version of JAX by doing

pip install --upgrade "jax[cuda12_pip]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html

Requirements

Jaxampler requires Python 3.10 or later. It also requires the following packages:

jax>=0.4.0 
jaxlib>=0.4.0
typing_extensions>=4.5.0
jaxtyping>=0.2.24
matplotlib>=3.8.0
tfp-nightly
tqdm

The test suite is based on pytest. To run the tests, one needs to install pytest and run pytest at the root directory of this repo.

Algorithms and Distributions

Jaxampler currently supports the following algorithms and distributions:

Monte Carlo Methods
  • Hamiltonian Monte Carlo
  • Importance Sampling
  • Metropolis Adjusted Langevin Algorithm
  • Monte Carlo Box Integration
  • Monte Carlo Integration
  • Multiple-Try Metropolis
  • Sequential Monte Carlo
  • Variational Inference
  • Wang-Landau Sampling
  • Worm Algorithm
Samplers

  • Accept-Rejection Sampler
  • Adaptive Accept-Rejection Sampler
  • Gibbs Sampler
  • Hastings Sampler
  • Inverse Transform Sampler
  • Metropolis-Hastings Sampler
  • Slice Sampler

Random Variables

  • Bernoulli
  • Beta
  • Binomial
  • Boltzmann
  • Cauchy
  • Chi
  • Exponential
  • Gamma
  • Geometric
  • Gumbel
  • Laplace
  • Log Normal
  • Logistic
  • Multivariate Normal
  • Normal
  • Pareto
  • Poisson
  • Rademacher
  • Rayleigh
  • Student t
  • Triangular
  • Truncated Normal
  • Truncated Power Law
  • Uniform
  • Weibull

Citing Jaxampler

To cite this repository:

@software{jaxampler2023github,
    author  = {Meesum Qazalbash},
    title   = {{Jaxampler}: tool for sampling statistical distributions},
    url     = {https://github.com/Qazalbash/jaxampler},
    version = {0.0.7},
    year    = {2023}
}

Contributors

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.