Class MultivariateLinearKalmanFilter


  • public class MultivariateLinearKalmanFilter
    extends Object
    The Kalman filter, also known as linear quadratic estimation (LQE), is an algorithm which uses a series of measurements observed over time, containing noise (random variations) and other inaccuracies, and produces estimates of unknown variables that tend to be more precise than those that would be based on a single measurement alone. More formally, the Kalman filter operates recursively on streams of noisy input data to produce a statistically optimal estimate of the underlying system state.
    • Constructor Detail

      • MultivariateLinearKalmanFilter

        public MultivariateLinearKalmanFilter​(MultivariateDLM model)
        Construct a Kalman filter from a multivariate controlled dynamic linear model.
        Parameters:
        model - a multivariate controlled DLM
    • Method Detail

      • filtering

        public void filtering​(MultivariateIntTimeTimeSeries Yt)
        Filter the observations without control variable.
        Parameters:
        Yt - the observations
      • dimension

        public int dimension()
        Get the dimension of the system, i.e., the dimension of the state vector.
        Returns:
        the dimension of the system
      • size

        public int size()
        Get T, the number of hidden states or observations.
        Returns:
        T
      • getPredictedStates

        public MultivariateSimpleTimeSeries getPredictedStates()
        Get the prior expected states.
        Returns:
        the predicted states
      • getPredictedObservations

        public MultivariateSimpleTimeSeries getPredictedObservations()
        Get the prior observation predictions.
        Returns:
        the predicted observations
      • getFittedState

        public ImmutableVector getFittedState​(int t)
        Get the posterior expected state.
        Parameters:
        t - time, t ≥ 1
        Returns:
        the fitted state
      • getFittedStateVariance

        public ImmutableMatrix getFittedStateVariance​(int t)
        Get the posterior expected state variance.
        Parameters:
        t - time, t ≥ 1
        Returns:
        the fitted state variance
      • getPredictedState

        public ImmutableVector getPredictedState​(int t)
        Get the prior expected state.
        Parameters:
        t - time, t ≥ 1
        Returns:
        the predicted state
      • getPredictedStateVariance

        public ImmutableMatrix getPredictedStateVariance​(int t)
        Get the prior expected state variance.
        Parameters:
        t - time, t ≥ 1
        Returns:
        the predicted state variance
      • getPredictedObservation

        public ImmutableVector getPredictedObservation​(int t)
        Get the prior observation prediction.
        Parameters:
        t - time, t ≥ 1
        Returns:
        the predicted observation
      • getPredictedObservationVariance

        public ImmutableMatrix getPredictedObservationVariance​(int t)
        Get the prior observation prediction variance.
        Parameters:
        t - time, t ≥ 1
        Returns:
        the predicted observation variance
      • getKalmanGain

        public ImmutableMatrix getKalmanGain​(int t)
        Get the Kalman gain.
        Parameters:
        t - time, t ≥ 1
        Returns:
        the Kalman gain