altar.models.linear.Linear
Module Contents
Classes
- class altar.models.linear.Linear.Linear(name, locator, **kwds)
Bases:
altar.models.bayesian- parameters
- doc = the number of parameters in the model
- observations
- doc = the number of data samples
- prep
- default
- doc = the distribution used to generate the initial sample
- prior
- default
- doc = the prior distribution
- norm
- default
- doc = the norm to use when computing the data log likelihood
- case
- doc = the directory with the input files
- green
- doc = the name of the file with the Green functions
- data
- doc = the name of the file with the observations
- cd
- doc = the name of the file with the data covariance matrix
- ifs
- G
- d
- Cd
- Cd_inv
- residuals
- normalization = 1
- initialize(self, application)
Initialize the state of the model given a {problem} specification
- initializeSample(self, step)
Fill {step.θ} 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”
- 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
- mountInputDataspace(self, pfs)
Mount the directory with my input files
- loadInputs(self)
Load the data in the input files into memory
- computeCovarianceInverse(self, cd)
Compute the inverse of the data covariance matrix
- computeNormalization(self, observations, cd)
Compute the normalization of the L2 norm
- initializeResiduals(self, samples, data)
Prime the matrix that will hold the residuals (G θ - d) for each sample by duplicating the observation vector as many times as there are samples