CovariatedPrediction

Description

CovariatedPrediction class contains three distinct trasformations used to calculate the compound prediction and the full covariance matrix for it. The trasformations are the following:

  1. Prediction transformation calculates the concatenated prediction based on several input predictions.

  2. Covbase transformation calculates the predefined part of the block covariance matrix based on input covaraince matrices given as is.

  3. Cov transformation calculates the extra systematic part of the covariance matrix based on the known parameters uncertainties.

The result is not the covariance matrix V it self, but it’s Cholesky decomposition L as needed by the Chi2 transformation.

Prediction transformation

Description

Calculate compound prediction vector μ by concatenating individual predictions mi.

Inputs

  1. Input vector m1.

  2. Optional input vector m2.

  3. etc.

Vectors mi are added via append(obs) method.

Outputs

  1. 'prediction.prediction' — Prediction vector μ.

Implementation

Calculates μ as a concatination product of vectors mi:

μ={m1,m2,}.

Covbase transformation

Description

Calculate compound covariance matrix based on statistical uncertainties (diagonal) , optional covariation matrices for each prediction mi and between predictions mi and mj. The pull terms are included here.

This is the constant predefined covariance matrix part: the base.

Inputs

  1. Covariance matrix. Options:

    1. covariance matrix Vi for model mi.

    2. cross covariance matrix Vij for models mi mj.

  2. etc.

Inputs are assigned via covariate(cov, obs1, n1, obs2, n2) method.

Outputs

  1. 'covbase.covbase' — basic covariance matrix with optional pull-terms.

Implementation

Calculates Vbase as a block matrix:

Vbase=(V1V12V12TV2).

Returns constructed covariance matrix. .. Returns the Cholesky decomposition Lbase.

Cov transformation

Description

Calculate the final covariance matrix based on:
  • predefined covariance base.

  • extra (optional) systematical part based on the variation of the prediction μ due to variation of the systematical parameters η.

Inputs

  1. 'cov.covbase' — Base covariance matrix Vbase.

  2. Optional systematical covariance matrix due to propagation of uncertain parameters.

See Jacobian, ParMatrix and MatrixProduct transformations. Parameters ηi are meant to be uncorrelated.

Outputs

  1. 'cov.L' — full covariance matrix Cholesky decomposition L: V=LLT.

IMPORTANT: Be sure to use L as lower triangular matrix (use numpy.tril or triangularView<Eigen::Lower>). Upper triangular part may contain unmaintained non-zero elements.

Implementation

Calculates covariance matrix V in the linear approximation:

V=Vbase+JVsysJT,

where J is the complete Jacobian:

J={J1,J2,}.

Considering prediction column of size [N×1] and uncertainties vector of size M the Jacobian J dimension is [N×M] and covariance matrix V dimension is [N×N].

Then the Cholesky decomposition is applied to the full covaraince matrix V:

V=LLT

Returns the Cholesky decomposition L of V.