Ukf
polars_ts.bayesian.ukf
Unscented Kalman Filter (UKF).
Propagates sigma points through user-defined nonlinear transition and observation functions, then recovers the posterior mean and covariance via a weighted combination.
Reference
Julier & Uhlmann (1997). A New Extension of the Kalman Filter to Nonlinear Systems.
UnscentedKalmanFilter
Unscented Kalman Filter for nonlinear state-space models.
Parameters
f
State transition function f(x) -> x_next.
Takes a 1D state array and returns the predicted state.
h
Observation function h(x) -> y.
Takes a 1D state array and returns the predicted observation.
Q
Process noise covariance (n, n).
R
Observation noise covariance (m, m).
x0
Initial state mean (n,).
P0
Initial state covariance (n, n).
alpha
Spread of sigma points around the mean. Default 1e-3.
beta
Prior knowledge of distribution (2.0 is optimal for Gaussian).
kappa
Secondary scaling parameter. Default 0.0.
filter(y)
Run the UKF forward pass.
Parameters
y
Observations (T,) or (T, m). Use np.nan for missing.
Returns
KalmanResult
_sigma_points(x, P, alpha, beta, kappa)
Generate sigma points and weights for the unscented transform.