# tfp.experimental.sequential.ensemble_kalman_filter_log_marginal_likelihood

Ensemble Kalman filter log marginal likelihood.

The Ensemble Kalman Filter is a Monte Carlo version of the traditional Kalman Filter. See also . It assumes the model

``````X[t] ~ transition_fn(X[t-1])
Y[t] ~ observation_fn(X[t])
``````

This method estimates (logarithm of) the marginal likelihood of the observation at step `t`, `Y[t]`, given `state`. Typically, `state` is the predictive ensemble at time `t`. In that case, this function approximates `Log[p(Y[t] | Y[t-1], Y[t-2],...)]` The approximation is correct under a Linear Gaussian state space model assumption, as ensemble size --> infinity.

`state` Instance of `EnsembleKalmanFilterState` at step `k`, conditioned on previous observations `Y_{1:k}`. Typically this is the output of `ensemble_kalman_filter_predict`.
`observation` `Tensor` representing the observation at step `k`.
`observation_fn` callable returning an instance of `tfd.MultivariateNormalLinearOperator` along with an extra information to be returned in the `EnsembleKalmanFilterState`.
`perturbed_observations` Whether the marginal distribution `p(Y[t] | ...)` is estimated using samples from the `observation_fn`'s distribution. If `False`, the distribution's covariance matrix is used directly. This latter choice is less common in the literature, but works even if the ensemble size is smaller than the number of observations.
`low_rank_ensemble` Whether to use a LinearOperatorLowRankUpdate (rather than a dense Tensor) to represent the observation covariance. The "low rank" is the ensemble size. This is useful only if (i) the ensemble size is much less than the number of observations, and (ii) the LinearOperator associated with the observation_fn has an efficient inverse
`seed` PRNG seed; see `tfp.random.sanitize_seed` for details.
`name` Python `str` name for ops created by this method. Default value: `None` (i.e., `'ensemble_kalman_filter_log_marginal_likelihood'`).

`log_marginal_likelihood` `Tensor` with same dtype as `state`.

`InsufficientEnsembleSizeError` If `perturbed_observations=True` and the ensemble size is not at least one greater than the number of observations.

 Geir Evensen. Sequential data assimilation with a nonlinear quasi-geostrophic model using Monte Carlo methods to forecast error statistics. Journal of Geophysical Research, 1994.

 Matthias Katzfuss, Jonathan R. Stroud & Christopher K. Wikle Understanding the Ensemble Kalman Filter. The Americal Statistician, 2016.

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]