telescopic.initial

Initial distributions: where each pair of chains starts.

Classes

Empirical

The uniform distribution over a set of points, such as the last state of an ensemble.

Normal

Multivariate normal initial distribution \(\mathcal N(\mu, \Sigma)\).

Uniform

Uniform initial distribution on the box [low, high).

telescopic.initial.as_initial(init)

Interpret init as an initial distribution.

Parameters:
init

An object with rvs(random_state=generator), such as a frozen SciPy distribution, Normal, Uniform or Empirical; a callable init(rng); or an array of points of shape (n, d), used as Empirical.

Returns:
object with rvs(random_state=generator)
telescopic.initial.draw(initial, generator, ndim=None)

One validated draw from initial: finite, of shape (d,) with d >= 1, or (ndim,).

A draw of shape (1, d), as from a frozen scipy.stats.dirichlet, becomes (d,).

Parameters:
initialdistribution

An object with rvs(random_state=generator), as as_initial() returns.

generatornumpy.random.Generator

The generator passed to rvs.

ndimint, optional

The dimension the draw must have; any d >= 1 if None.

Returns:
ndarray, shape (d,)

A new array of float64.

Raises:
TypeError

If the draw is not real numbers.

ValueError

If the draw has another shape or is not finite.