fips.covariance.CovarianceModel.build#

abstractmethod CovarianceModel.build(space, name=None)[source]#

Return the covariance on space.

Parameters:
  • space (Space) – The labels the covariance is put on. Each model reads its levels from them; a covariance given as a part is aligned to them.

  • name (str | None) – The covariance’s name.

Returns:

The covariance, rows and columns in the order of space, in its cheapest form.

Return type:

Covariance

Raises:
  • KeyError – If a model reads a level the space does not have, or a block the model names is not in the space.

  • ValueError – If a block lacks a level a model reads, the labels of a Series of standard deviations are not the space’s (or the space has more than one block), or the labels of a covariance given as a part do not match the space’s.