altar.bayesian.Metropolis

Module Contents

Classes

class altar.bayesian.Metropolis.Metropolis(name, locator, **kwds)

Bases: altar.component

The Metropolis algorithm as a sampler of the posterior distribution

scaling
doc = the parameter covariance Σ is scaled by the square of this
acceptanceWeight
doc = the weight of accepted samples during covariance rescaling
rejectionWeight
doc = the weight of rejected samples during covariance rescaling
steps = 1
uniform
uninormal
sigma_chol
dispatcher
initialize(self, application)

Initialize me and my parts given an {application} context

samplePosterior(self, annealer, step)

Sample the posterior distribution

resample(self, annealer, statistics)

Update my statistics based on the results of walking my Markov chains

prepareSamplingPDF(self, annealer, step)

Re-scale and decompose the parameter covariance matrix, in preparation for the Metropolis update

walkChains(self, annealer, step)

Run the Metropolis algorithm on the Markov chains

displace(self, sample)

Construct a set of displacement vectors for the random walk from a distribution with zero mean and my covariance

adjustCovarianceScaling(self, accepted, rejected, unlikely)

Compute a new value for the covariance sacling factor based on the acceptance/rejection ratio