altar.distributions.Distribution

Module Contents

Classes

class altar.distributions.Distribution.Distribution

Bases: altar.protocol

The protocol that all AlTar probability distributions must satisfy

parameters
doc = the number of model parameters that i take care of
offset
doc = the starting point of my parameters in the overall model state
initialize(self, **kwds)

Initialize with the given random number generator

initializeSample(self, theta)

Fill my portion of {theta} with initial random values from my distribution.

priorLikelihood(self, theta, prior)

Fill my portion of {prior} with the likelihoods of the samples in {theta}

verify(self, theta, mask)

Check whether my portion of the samples in {theta} are consistent with my constraints, and update {mask}, a vector with zeroes for valid samples and non-zero for invalid ones

sample(self)

Sample the distribution using a random number generator

density(self, x)

Compute the probability density of the distribution at {x}

vector(self, vector)

Fill {vector} with random values

matrix(self, matrix)

Fill {matrix} with random values

classmethod pyre_default(cls)

Supply a default implementation