altar.data.DataL2

Module Contents

Classes

class altar.data.DataL2.DataL2(name, locator, **kwds)

Bases: altar.component

The observed data with L2 norm

data_file
doc = the name of the file with the observations
observations
doc = the number of observed data
cd_file
doc = the name of the file with the data covariance matrix
cd_std
doc = the constant covariance for data
merge_cd_with_data
doc = whether to merge cd with data
norm
default
doc = the norm to use when computing the data log likelihood
normalization = 0
ifs
samples
dataobs
dataobs_batch
cd
cd_inv
error
initialize(self, application)

Initialize data obs from model

evalLikelihood(self, prediction, likelihood, residual=True, batch=None)

compute the datalikelihood for prediction (samples x observations)

dataobsBatch(self)

Get a batch of duplicated dataobs

loadData(self)

load data and covariance

initializeCovariance(self, cd)

For a given data covariance cd, compute L2 likelihood normalization, inverse of cd in Cholesky decomposed form, and merge cd with data observation, d-> L*d with cd^{-1} = L L* :param cd: :return:

updateCovariance(self, cp)

Update data covariance with cp, cd -> cd + cp :param cp: a matrix with shape (obs, obs) :return:

computeNormalization(self, observations, cd)

Compute the normalization of the L2 norm

computeCovarianceInverse(self, cd)

Compute the inverse of the data covariance matrix