Unscented Kalman Filter

class kalman.unscented.UnscentedKalmanFilter(*args: Any, **kwargs: Any)[source]

Scaled–sigma‑point Unscented Kalman Filter.

Parameters

state_dim, obs_dimint

Dimensions n and m.

f, hCallable[[torch.Tensor], torch.Tensor]

Process / measurement models that expect sigma‑points of shape (..., 2n + 1, n) and return the propagated sigma‑points with the same shape.

alpha, beta, kappafloat

Standard UKF scaling parameters.

Q, Rtorch.Tensor, optional

Process‑ and measurement‑noise covariances.

init_mean, init_covtorch.Tensor, optional

Initial posterior (after a fictitious step 0 update).

epsfloat

Jitter added to all Cholesky factorizations and post‑update covariances for numerical stability.

forward(observations: torch.Tensor)[source]

Run the UKF over a sequence of observations.

Parameters

observationstorch.Tensor

Shape (T, B, obs_dim)

Returns

all_states : GaussianState ‑‑ convenient wrapper holding the whole trajectory

predict(state: GaussianState) GaussianState[source]

Single-step predict. Returns:

GaussianStateю

predict_(state_mean: torch.Tensor, state_cov: torch.Tensor)

Internal function for single-step predict. Returns:

predicted_state_mean, predicted_state_cov

predict_update(state: GaussianState, measurement: torch.Tensor) GaussianState[source]

Single-step predict and update in one function. Returns:

updated_state_mean, updated_state_cov

update(state: GaussianState, measurement: torch.Tensor) GaussianState[source]

Single-step update. Returns:

GaussianStateю

update_(state_mean: torch.Tensor, state_cov: torch.Tensor, measurement: torch.Tensor)

Internal single-step update. Returns:

updated_state_mean, updated_state_cov