fips.covariance.KroneckerError#
- class fips.covariance.KroneckerError(name, variances, marginal_kernels)[source]#
Bases:
ErrorComponentBuilds a full covariance matrix for a strict grid.
Uses Kronecker products of N arbitrary marginal correlation matrices.
- Parameters:
name (str) – Name of the error component.
variances (float or pd.Series) – Variances for the diagonal of the covariance matrix. Can be a single float or a Series indexed by the same MultiIndex as the covariance matrix.
marginal_kernels (list of tuples) –
Each tuple contains:
The dimension name(s) as a string or list of strings.
The Callable kernel function that takes a DataFrame of those unique coordinates and returns a 2D correlation matrix.
Note
ORDER MATTERS: These must be provided in the exact order that the dimensions appear in the matrix’s MultiIndex!
Attributes
List of marginal kernels, each defined by a tuple of dimension name(s) and a kernel function. |
Methods
|
Build covariance matrix using product of marginal kernels. |
Inherited
From ErrorComponent: name, variances