altar.cuda.models

Submodules

Package Contents

Classes

Functions

class altar.cuda.models.model

Bases: altar.protocol

The protocol that all AlTar models must implement

posterior(self, application)

Sample my posterior distribution

initialize(self, application)

Initialize the state of the model given a {problem} specification

initializeSample(self, step)

Fill {step.theta} with an initial random sample from my prior distribution.

priorLikelihood(self, step)

Fill {step.prior} with the likelihoods of the samples in {step.theta} in the prior distribution

dataLikelihood(self, step)

Fill {step.data} with the likelihoods of the samples in {step.theta} given the available data. This is what is usually referred to as the “forward model”

posteriorLikelihood(self, step)

Given the {step.prior} and {step.data} likelihoods, compute a generalized posterior using {step.beta} and deposit the result in {step.post}

likelihoods(self, step)

Convenience function that computes all three likelihoods at once given the current {step} of the problem

verify(self, step, mask)

Check whether the samples in {step.theta} are consistent with the model requirements and update the {mask}, a vector with zeroes for valid samples and non-zero for invalid ones

top(self, annealer)

Notification that a β step is about to start

bottom(self, annealer)

Notification that a β step just ended

forwardProblem(self, application, theta=None)

Perform the forward modeling with given {theta}

classmethod pyre_default(cls, **kwds)

Supply a default implementation

class altar.cuda.models.parameters

Bases: altar.protocol

The protocol that all AlTar parameter sets must implement

count
doc = the number of parameters in this set
prior
doc = the prior distribution
prep
doc = the distribution to use to initialize this parameter set
initialize(self, model, offset)

Initialize the parameter set given the {model} that owns it

initializeSample(self, theta)

Fill {theta} with an initial random sample from my prior distribution.

priorLikelihood(self, theta, priorLLK)

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

verify(self, theta, mask)

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

classmethod pyre_default(cls, **kwds)

Supply a default implementation

altar.cuda.models.bayesian()
altar.cuda.models.bayesianensemble()
altar.cuda.models.parameterset()