Ensemble Rauch-Tung-Striebel smoother
The EnRTS is an ensemble RTS-like smoothing algorithm, similar in form to the RTS smoothing algorithm. It forms a backwards recursion using a gain \(J_t\):
where \(J_t\) is determined by ensembles to be an empirical version of the Kalman gain.
The computation of \(J_t\) involves the ensemble of \(x_{t+1 \mid t}\); to avoid duplicate computation, the EnRTS therefore requires store_predicted_ensemble=True in the forward filtering run.
See Raanes (2016) for more info on the EnRTS algorithm and its equivalence to the ensemble Kalman smoother (EnKS), a simliar ensemble smoothing algorithm which consists of a forward pass of increasing dimension.
cuthbert.ensemble_kalman.ensemble_rts_smoother
Implements the high-level Ensemble Rauch-Tung-Striebel smoother (EnRTS).
EnRTSState
Bases: NamedTuple
Ensemble Rauch-Tung-Striebel smoother state.
ensemble
instance-attribute
predicted_ensemble
instance-attribute
model_inputs
instance-attribute
n_particles
property
Number of particles.
mean
property
Ensemble mean.
chol_cov
property
Generalised Cholesky factor of the ensemble sample covariance.
build_smoother()
Build an Ensemble Rauch-Tung-Striebel smoother object.
Filtered states must come from an EnKF built with
store_predicted_ensemble=True.
Returns:
| Type | Description |
|---|---|
Smoother
|
Smoother object for the EnRTS. |
Source code in cuthbert/ensemble_kalman/ensemble_rts_smoother.py
smoother_prepare(filter_state, model_inputs, key=None)
Prepare a state for an EnRTS step.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_state
|
EnKFState
|
EnKF state at time t. |
required |
model_inputs
|
ArrayTreeLike
|
Model inputs for the transition from t to t + 1. |
required |
key
|
KeyArray | None
|
JAX random key; unused. |
None
|
Returns:
| Type | Description |
|---|---|
EnRTSState
|
Prepared EnRTS state. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the EnKF did not store predicted ensembles. |
Source code in cuthbert/ensemble_kalman/ensemble_rts_smoother.py
smoother_combine(state_1, state_2)
Combine a prepared state with the next EnRTS state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state_1
|
EnRTSState
|
Prepared state at time t. |
required |
state_2
|
EnRTSState
|
Smoothed state at time t + 1. |
required |
Returns:
| Type | Description |
|---|---|
EnRTSState
|
Smoothed state at time t. |
Source code in cuthbert/ensemble_kalman/ensemble_rts_smoother.py
convert_filter_to_smoother_state(filter_state, model_inputs=None, key=None)
Convert the final EnKF state to an EnRTS state.
Requires filter_state to contain predicted ensembles (via store_predicted_ensemble=True in the filter).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_state
|
EnKFState
|
Final EnKF state. |
required |
model_inputs
|
ArrayTreeLike | None
|
Model inputs used to define the output tree structure. |
None
|
key
|
KeyArray | None
|
JAX random key - not used. |
None
|
Returns:
| Type | Description |
|---|---|
EnRTSState
|
Final EnRTS state with dummy model inputs. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the EnKF did not store predicted ensembles. |