kalman
======

.. py:module:: smolgp.solvers.kalman


Functions
---------

.. autoapisummary::

   smolgp.solvers.kalman.KalmanFilter
   smolgp.solvers.kalman.kalman_filter


Module Contents
---------------

.. py:function:: KalmanFilter(kernel, X, y, R, return_v_S=False)

   Wrapper for jitted kalman_filter function

   :param kernel: StateSpaceModel kernel
   :param X: data coordinates, e.g. time or (time, texp, instid)
   :param y: observations, shape (N, D)
   :param R: observation noise covariance, shape (N, D, D)

   :returns: filtered means
             P_filtered: filtered covariances
             m_predicted: predicted means
             P_predicted: predicted covariances
   :rtype: m_filtered


.. py:function:: kalman_filter(A, Q, H, R, t, y, m0, P0)

   Jax implementation of the Kalman filter algorithm

   See Theorem 4.2 (pdf page 77) in "Bayesian Filtering and Smoothing"
   by Simo S{"a}rkk{"a} for detailed description of the algorithm and notation.

   e.g. _prev is _{k-1}
        _pred is _k^{-}

   Total runtime complexity is O(N*d^3) where N is the number
   of time steps and d is the dimension of the state vector.


