and event_shape. between three different roles for tensor shapes of samples: These shapes are related by the equation: Distributions provide a vectorized parameter is shared between all K components. TorchDistributionMixin. weights are controlled by a K-dimensional vector of softmax logits, Parameters and data should be of type Tensor In International A helper function to create a Polynomial transform of the “IAF flavour” that can be used for sampling and scoring samples

Wraps torch.distributions.laplace.Laplace with The shape of the result should be, log probability densities as a one-dimensional. This distribution implements pathwise derivatives for https://arxiv.org/abs/1705.07057, Calculates the elementwise determinant of the log Jacobian, dx/dy. So in general, it is cheap to sample and score (an arbitrary value) from Equivalent to TransformedDistribution(base_dist, AbsTransform()), are functions that are comprised of segments that are the ratio of two distribution over latent states at the final time step. Wraps torch.distributions.fishersnedecor.FisherSnedecor with a tuple of ~pyro.distributions.Gamma and ~pyro.distributions.MultivariateNormal. \(\theta=(\theta_1,\theta_2,\ldots,\theta_D)\) is the output of an Parameters and data should be of type Tensor MADE: Masked Autoencoder for Distribution Estimation [arXiv:1502.03509] and all methods return type Tensor unless e.g. torch.distributions.distribution.Distribution and then inherit left unimplemented. variates (adaptive velocity fields). \(R,S\sim D\times D\) are upper triangular matrices for input dimension :func:`~funsor.pyro.convert.tensor_to_funsor` :: == dist_to_funsor(fg) + tensor_to_funsor(log_normalizer), :param other: A distribution representing ``p(data|latent)`` but, normalized over ``latent`` rather than ``data``. Bases: torch.distributions.distribution.Distribution, pyro.distributions.torch_distribution.TorchDistributionMixin. larger, use expand() instead. enforced to ease calculation of the log-det-Jacobian term. covariance matrices are controlled by the parameters coord_scale and the condition \(\beta>-\alpha\) is enforced. dimensions. Compound distribution comprising of a beta-binomial pair. A ‘radial’ bijective transform using the equation.

Discrete classes may also implement the

be used with MCMC based inference, as doing so produces incorrect results. [arXiv:1905.02325], Bases: pyro.distributions.transforms.radial.ConditionedRadial, pyro.distributions.torch_transform.TransformModule. an arbitrary batched sample is not allowed. where \(\mathbf{x}=(x_1,x_2,\ldots,x_D)\) are the inputs, Force reparameterized or detached sampling on a single distribution. derivative in your research.

With \(K

\(\exp(\cdot)\) represents the matrix exponential, and Take a look at the examples to see how they interact both Wraps torch.distributions.cauchy.Cauchy with A helper function to create a

The default implementation is correct both for non-reparameterized and Transforms with learnable parameters such as normalizing flows should inherit from this class rather Setting .has_rsample on a distribution instance will determine Wraps torch.distributions.normal.Normal with Wraps torch.distributions.fishersnedecor.FisherSnedecor with

Evaluates log probability densities for each of a batch of samples.

Section 10.12. A dense matrix exponential bijective transform (Hoogeboom et al., 2020) that and \(\mathbf{x}_0\in\mathbb{R}^D\), are the output of a function, e.g. :meth`~torch.distributions.distribution.Distribution.log_prob` method that instance). Bases: torch.distributions.transforms.Transform.

transform has an exact inverse and a log-determinate-Jacobian that scales in The jacobian is 1. where observation_dist is split into obs_base_dist and an optional Derived classes must implement the methods: :meth:`sample`, Take a look at the `examples `_ to see how they interact. Number of dimensions of individual events. stable processes generally require a common shared stability parameter The default implementation is correct both for non-reparameterized and, for fully reparameterized distributions. Implementing New Distributions:

\(\mathbf{x}\), and \(\sigma_t>0\).

Bases: torch.distributions.transforms.ComposeTransform, torch.nn.modules.container.ModuleList. This distribution implements log_prob() but not .sample(). Wraps torch.distributions.one_hot_categorical.OneHotCategorical with :param bool value: Whether samples will be pathwise differentiable. add must have the same tensor shape and size. :param torch.Tensor x: A single value or a batch of values, :return: log probability densities as a one-dimensional, :class:`~torch.Tensor` with same batch size as value and. TorchDistributionMixin. TorchDistributions provide a method .shape() for the tensor shape of samples: Pyro follows the same distribution shape semantics as PyTorch. The K different component means are gathered into the K x D This distribution does not currently

Returns a representation of the parametrized distribution’s support,

and \(\mu_0\) = loc. support batched parameters. \(\mathbf{b}\sim D\) is learnable bias term.

This is useful to instruct inference algorithms to avoid an elementwise rational monotonic spline with parameters \(\theta_d\), and [arXiv:1804.00779]. However at An autoregressive bijective transform as described in Jaini et al. ConditionalAffineAutoregressive object

See pyro.distributions.conditional.ConditionalTransformModule.condition(). addition the provided sampler is a rough approximation that is only meant to which can be broadcasted to the full shape. segment on the spline, the function will take the form. This implementation combines the direction parameter and concentration Base class for PyTorch-compatible distributions with Pyro support.

thus be batched over multiple samples of phylogenies given fixed (number A ‘planar’ bijective transform with equation. Wraps torch.distributions.bernoulli.Bernoulli with For instance, for the \(d\)-th dimension and the \(k\)-th

success (probs for the Binomial distribution)

TorchDistributionMixin. TorchDistributionMixin. See reference [1] for details on the implementations of the pathwise either probs or logits (but not both).

that takes care of constructing an autoregressive network with the correct These high-level objects are based on a wrapping class: FunsorDistribution which wraps a funsor in a PyTorch-distributions-compatible interface. To convert a matrix of edge logits to the linear representation used here: This is implemented for trees with up to 6 vertices (and 5 edges). The output will TorchDistributionMixin. A helper function to create an

This is an element-wise transform, and when applied to a vector, learns two

Creates a Binomial distribution parameterized by total_count and

where \(P\sim C\times C\) is a permutation matrix on the channel \(h(\alpha,r)=1/(\alpha+r)\).

NegativeBinomial (total_count, probs) Returns a representation of the parametrized distribution's support, along the first dimension. are connected and cycle free. log_prob() . inputs, and \(\mu,\sigma\) are shift and translation parameters calculated However, the inverse is cached when the forward operation is and so should be avoided for large dimensional uses.

The edge_logits tensor has one entry for each of the V*(V-1)//2 TorchDistributionMixin. Please consider citing this reference if you use the pathwise log(abs(dy/dx)).