Distribution Funsors

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

class Distribution(*args)[source]

Bases: funsor.terms.Funsor

Funsor backed by a PyTorch/JAX distribution object.

Parameters:*args – Distribution-dependent parameters. These can be either funsors or objects that can be coerced to funsors via to_funsor() . See derived classes for details.
dist_class = 'defined by derived classes'
eager_reduce(op, reduced_vars)[source]
has_enumerate_support
classmethod eager_log_prob(*params)[source]
unscaled_sample(sampled_vars, sample_inputs, rng_key=None)[source]
enumerate_support(expand=False)[source]
entropy()[source]
mean()[source]
variance()[source]