Example

class telescopic.examples.Example(name, log_prob, grad, initial, mean, cov, conditional=None, blocks=None)

A target with exact answers.

Attributes:
namestr
log_prob, gradcallable()

The log-density, up to a constant, and its gradient, for a point of shape (d,) or a batch of shape (n, d); pass vectorize=True with batches.

initialobject with rvs(random_state=...)

A default initial distribution, with at least the target’s variance in each coordinate.

mean, covndarray, shapes (d,) and (d, d)

The exact mean and covariance.

ndimint

The dimension d.

conditionalcallable(), optional

For Gibbs, conditional(x, b): the full conditional of block b given the other coordinates of x.

blockslist of ndarray, optional

The blocks of conditional.

property ndim

The dimension d.

Returns:
int