altar.models.Bayesian

Module Contents

Classes

class altar.models.Bayesian.Bayesian(name, locator, **kwds)

Bases: altar.component

The base class of AlTar models that are compatible with Bayesian explorations

offset
doc = the starting point of my state in the overall controller state
parameters
doc = the number of model degrees of freedom
psets
default
doc = an ensemble of parameter sets in the model
rng
controller
job
info
warning
error
default
firewall
initialize(self, application)

Initialize the state of the model given an {application} context

posterior(self, application)

Sample my posterior distribution

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, annealer, step)

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

abstract 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}

mountInputDataspace(self, pfs)

Mount the directory with my input files

restrict(self, theta)

Return my portion of the sample matrix {theta}