Creates a random ill-conditioned Gaussian.

Inherits From: Model

The covariance matrix has eigenvalues sampled from the inverse Gamma distribution with the specified shape, and then rotated by a random orthogonal matrix.

Note that this function produces reproducible targets, i.e. the constructor seed argument always needs to be non-None.

ndims Python int. Dimensionality of the Gaussian.
gamma_shape_parameter Python float. The shape parameter of the inverse Gamma distribution. Anything below 2 is likely to yield poorly conditioned covariance matrices.
max_eigvalue Python float. If set, will normalize the eigenvalues such that the maximum is this value.
seed Seed to use when generating the eigenvalues and the random orthogonal matrix.
name Python str name prefixed to Ops created by this class.
pretty_name A Python str. The pretty name of this model.


default_event_space_bijector Bijector mapping the reals (R**n) to the event space of this model.
dtype The DType of Tensors handled by this model.
event_shape Shape of a single sample from as a TensorShape.

May be partially defined or unknown.

name Python str name prefixed to Ops created by this class.
sample_transformations A dictionary of names to SampleTransformations.

Child Classes

class SampleTransformation



View source

Generate samples of the specified shape from the target distribution.

The returned samples are exact (and independent) samples from the target distribution of this model.

Note that a call to sample() without arguments will generate a single sample.

sample_shape 0D or 1D int32 Tensor. Shape of the generated samples.
seed Python integer or tfp.util.SeedStream instance, for seeding PRNG.
name Name to give to the prefix the generated ops.

samples a Tensor with prepended dimensions sample_shape.


View source

The un-normalized log density of evaluated at a point.

This corresponds to the target distribution associated with the model, often its posterior.

value A (nest of) Tensor to evaluate the log density at.
name Python str name prefixed to Ops created by this method.

unnormalized_log_prob A floating point Tensor.