Skip to content

Enkf

polars_ts.bayesian.enkf

Ensemble Kalman Filter (EnKF).

Monte Carlo ensemble propagation through nonlinear transition and observation functions. Scalable to high-dimensional states where maintaining a full covariance matrix is infeasible.

Reference

Evensen (2003). The Ensemble Kalman Filter: theoretical formulation and practical implementation.

EnsembleKalmanFilter

Ensemble Kalman Filter for nonlinear state-space models.

Parameters

f State transition function f(x) -> x_next. h Observation function h(x) -> y. Q Process noise covariance (n, n). R Observation noise covariance (m, m). x0 Initial state mean (n,). P0 Initial state covariance (n, n). n_ensemble Number of ensemble members. Default 50. seed Random seed for reproducibility.

filter(y)

Run the EnKF forward pass.

Parameters

y Observations (T,) or (T, m). Use np.nan for missing.

Returns

KalmanResult