fips.posterior.Solution#
- class fips.posterior.Solution(*args, **kwargs)[source]#
Bases:
ProtocolWhat a
Posteriorasks of the object a method keeps from its solve.A method solves a
Problemand keeps whatever it needs to answer these questions (the analytic method keeps a factorization of its system; a sampling method would keep its samples). Each answer is an unlabeled NumPy array (or a float), in the order of the problem’s spaces:nthe state elements (problem.prior),mthe observations (problem.obs). The posterior labels them, and computes each one once.Four members are optional, and a posterior whose solution lacks one says so when it is asked for the feature:
with_gamma(gamma) -> Solution: the solution at another regularization factor, without solving again (Posterior.with_gamma()).with_data(problem) -> Solution: the solution of problem, the same problem with other values of the observations, without solving again (Posterior.with_data()).innovation_precision(groups) -> list[np.ndarray]: for each array of observation positions \(g\), the block \(P_{gg}\) of \(P = (H S_0 H^T + S_z/\gamma)^{-1}\) (m_g x m_g), andself_sensitivity() -> np.ndarray: \(\operatorname{diag}(H K)\) (m), whose sum is DOFS (Posterior.data_worth()).
And a solution whose
estimate()is the posterior mean says so with a class attributeestimate_is_mean = True; without it, a posterior has nomean. One whose estimate is linear in the observations, \(\hat{x} = x_0 + K (z - H x_0 - c)\) with the \(K\) ofgain()whatever the values of \(z\), says so withestimate_is_linear = True; without it, a posterior has norecovery().See also
PosteriorThe labeled answer built on it.
fips.methodsHow a method is added.
Methods
|
Return the chi-squared of the solution: the sum of the data and the state misfits. |
Return Rodgers' four chi-squared tests, each its chi-squared and degrees of freedom. |
|
|
Return the posterior error covariance of the state, or of aggregates of it. |
|
Return the degrees of freedom for signal, \(\operatorname{tr}(K H)\). |
Return the diagonal of the averaging kernel, \(\operatorname{diag}(K H)\) ( |
|
|
Return the point estimate of the state, \(\hat{x}\) ( |
|
Return the gain \(K\), or \(W K\) for an aggregation. |
Return the Shannon information content, \(-\tfrac{1}{2} \ln \lvert I - K H \rvert\), in nats. |
|
Return the posterior error variances, the diagonal of \(\hat{S}\) ( |