altar.cuda.distributions
Submodules
Package Contents
Classes
Functions
- class altar.cuda.distributions.distribution
Bases:
altar.protocolThe 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
- class altar.cuda.distributions.cudaDistribution(name, locator, **kwds)
Bases:
altar.distributions.Base.BaseThe base class for probability distributions
- parameters
- doc = the number of model parameters that belong to me
- offset
- doc = the starting point of my parameters in the overall model state
- device
- idx_range
- precision
- initialize(self, rng)
Initialize with the given random number generator
- 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
- cuInitialize(self, application)
cuda specific initialization
- cuInitSample(self, theta)
cuda process to initialize random samples
- cuVerify(self, theta, mask)
cuda process to verify the validity of samples
- cuEvalPrior(self, theta, prior)
cuda process to compute the prior
- altar.cuda.distributions.uniform()
- altar.cuda.distributions.gaussian()
- altar.cuda.distributions.tgaussian()
- altar.cuda.distributions.preset()