Module: oryx.bijectors

Module for probability bijectors and related functions.


class AbsoluteValue: Computes Y = g(X) = Abs(X), element-wise.

class Ascending: Maps unconstrained R^n to R^n in ascending order.

class AutoCompositeTensorBijector: Base for CompositeTensor bijectors with auto-generated TypeSpecs.

class AutoregressiveNetwork: Masked Autoencoder for Distribution Estimation [Germain et al. (2015)][1].

class Bijector: Interface for transformations of a Distribution sample.

class Blockwise: Bijector which applies a list of bijectors to blocks of a Tensor.

class Chain: Bijector which applies a composition of bijectors.

class CholeskyOuterProduct: Compute g(X) = X @ X.T; X is lower-triangular, positive-diagonal matrix.

class CholeskyToInvCholesky: Maps the Cholesky factor of M to the Cholesky factor of M^{-1}.

class Composition: Base class for Composition bijectors (Chain, JointMap).

class CorrelationCholesky: Maps unconstrained reals to Cholesky-space correlation matrices.

class Cumsum: Computes the cumulative sum of a tensor along a specified axis.

class Exp: Compute Y = g(X) = exp(X).

class Expm1: Compute Y = g(X) = exp(X) - 1.

class FFJORD: Implements a continuous normalizing flow X->Y defined via an ODE.

class FillScaleTriL: Transforms unconstrained vectors to TriL matrices with positive diagonal.

class FillTriangular: Transforms vectors to triangular.

class FrechetCDF: The Frechet cumulative density function.

class GeneralizedExtremeValueCDF: Compute the GeneralizedExtremeValue CDF.

class GeneralizedPareto: Bijector mapping R**n to non-negative reals.

class GompertzCDF: Compute Y = g(X) = 1 - exp(-c * (exp(rate * X) - 1), the Gompertz CDF.

class GumbelCDF: Compute Y = g(X) = exp(-exp(-(X - loc) / scale)), the Gumbel CDF.

class Householder: Compute the reflection of a vector across a hyperplane.

class Identity: Compute Y = g(X) = X.

class Inline: Bijector constructed from custom callables.

class Invert: Bijector which inverts another Bijector.

class IteratedSigmoidCentered: Bijector which applies a Stick Breaking procedure.

class JointMap: Bijector which applies a structure of bijectors in parallel.

class KumaraswamyCDF: Compute Y = g(X) = (1 - X**a)**b, X in [0, 1].

class LambertWTail: LambertWTail transformation for heavy-tail Lambert W x F random variables.

class Log: Compute Y = log(X). This is Invert(Exp()).

class Log1p: Compute Y = log1p(X). This is Invert(Expm1()).

class MaskedAutoregressiveFlow: Affine MaskedAutoregressiveFlow bijector.

class MatrixInverseTriL: Computes g(L) = inv(L), where L is a lower-triangular matrix.

class MatvecLU: Matrix-vector multiply using LU decomposition.

class MoyalCDF: Compute Y = g(X) = erfc(exp(- 1/2 * (X - loc) / scale) / sqrt(2)).

class NormalCDF: Compute Y = g(X) = NormalCDF(x).

class Pad: Pads a value to the event_shape of a Tensor.

class Permute: Permutes the rightmost dimension of a Tensor.

class Power: Compute g(X) = X ** power; where X is a non-negative real number.

class PowerTransform: Compute Y = g(X) = (1 + X * c)**(1 / c), X >= -1 / c.

class RationalQuadraticSpline: A piecewise rational quadratic spline, as developed in [1].

class RayleighCDF: Compute Y = g(X) = 1 - exp( -(X/scale)**2 / 2 ), X >= 0.

class RealNVP: RealNVP 'affine coupling layer' for vector-valued events.

class Reciprocal: A Bijector that computes the reciprocal b(x) = 1. / x entrywise.

class Reshape: Reshapes the event_shape of a Tensor.

class Restructure: Converts between nested structures of Tensors.

class Scale: Compute Y = g(X; scale) = scale * X.

class ScaleMatvecDiag: Compute Y = g(X; scale) = scale @ X.

class ScaleMatvecLU: Matrix-vector multiply using LU decomposition.

class ScaleMatvecLinearOperator: Compute Y = g(X; scale) = scale @ X.

class ScaleMatvecLinearOperatorBlock: Compute Y = g(X; scale) = scale @ X for blockwise X and scale.

class ScaleMatvecTriL: Compute Y = g(X; scale) = scale @ X.

class Shift: Compute Y = g(X; shift) = X + shift.

class ShiftedGompertzCDF: Compute Y = g(X) = (1 - exp(-rate * X)) * exp(-c * exp(-rate * X)).

class Sigmoid: Bijector that computes the logistic sigmoid function.

class Sinh: Bijector that computes Y = sinh(X).

class SinhArcsinh: Y = g(X) = Sinh( (Arcsinh(X) + skewness) * tailweight ) * multiplier.

class SoftClip: Bijector that approximates clipping as a continuous, differentiable map.

class Softfloor: Compute a differentiable approximation to tf.math.floor.

class SoftmaxCentered: Bijector which computes Y = g(X) = exp([X 0]) / sum(exp([X 0])).

class Softplus: Bijector which computes Y = g(X) = Log[1 + exp(X)].

class Softsign: Bijector which computes Y = g(X) = X / (1 + |X|).

class Split: Split a Tensor event along an axis into a list of Tensors.

class Square: Compute g(X) = X^2; X is a positive real number.

class Tanh: Bijector that computes Y = tanh(X), therefore Y in (-1, 1).

class TransformDiagonal: Applies a Bijector to the diagonal of a matrix.

class Transpose: Compute Y = g(X) = transpose_rightmost_dims(X, rightmost_perm).

class UnitVector: Bijector mapping vectors onto the unit sphere.

class WeibullCDF: Compute Y = g(X) = 1 - exp( -( X / scale) ** concentration), X >= 0.


masked_autoregressive_default_template(...): Build the Masked Autoregressive Density Estimator (Germain et al., 2015).

masked_dense(...): A autoregressively masked dense layer. Analogous to tf.layers.dense.

pack_sequence_as(...): Returns a Bijector variant of tf.nest.pack_sequence_as.

real_nvp_default_template(...): Build a scale-and-shift function using a multi-layer neural network.

tree_flatten(...): Returns a Bijector variant of tf.nest.flatten.