Funsor is a tensor-like library for functions and distributions

Domains

Operations

Interpretations

Interpreter

Monte Carlo

Memoize

Funsors

Basic Funsors

Delta

PyTorch

JAX

Gaussian

Joint

Contraction

Integrate

Optimizer

Adjoint Algorithms

Sum-Product Algorithms

Affine Pattern Matching

Testing Utiltites

Pyro-Compatible Distributions

This interface provides a number of PyTorch-style distributions that use funsors internally to perform inference. These high-level objects are based on a wrapping class: FunsorDistribution which wraps a funsor in a PyTorch-distributions-compatible interface. FunsorDistribution objects can be used directly in Pyro models (using the standard Pyro backend).

FunsorDistribution Base Class

Hidden Markov Models

Conversion Utilities

Distribution Funsors

This interface provides a number of standard normalized probability distributions implemented as funsors.

Mini-Pyro Interface

This interface provides a backend for the Pyro probabilistic programming language. This interface is intended to be used indirectly by writing standard Pyro code and setting pyro_backend("funsor"). See examples/minipyro.py for example usage.

Einsum Interface

This interface implements tensor variable elimination among tensors. In particular it does not implement continuous variable elimination.

Indices and tables