Kalman

class probnum.filtsmooth.Kalman(prior_process)[source]

Bases: probnum.filtsmooth._bayesfiltsmooth.BayesFiltSmooth

Gaussian filtering and smoothing, i.e. Kalman-like filters and smoothers.

Parameters

prior_process (MarkovProcess) – Prior Gauss-Markov process. Usually a MarkovProcess with a Normal initial random variable, and an LTISDE transition or an Integrator transition, but LinearSDE, ContinuousEKFComponent, or ContinuousUKFComponent are also valid. Describes a random process in \(K\) dimensions. If the transition is an integrator, K=spatialdim*(ordint+1) for some spatialdim and ordint.

Methods Summary

filter(regression_problem[, _previous_posterior])

Apply Gaussian filtering (no smoothing!) to a data set.

filtered_states_generator(regression_problem)

Apply Gaussian filtering (no smoothing!) to a data set.

filtsmooth(regression_problem[, …])

Apply Gaussian filtering and smoothing to a data set.

iterated_filtsmooth(regression_problem[, …])

Compute an iterated smoothing estimate with repeated posterior linearisation.

iterated_filtsmooth_posterior_generator(…)

Compute iterated smoothing estimates with repeated posterior linearisation.

smooth(filter_posterior[, _previous_posterior])

Apply Gaussian smoothing to the filtering outcome (i.e.

Methods Documentation

filter(regression_problem, _previous_posterior=None)[source]

Apply Gaussian filtering (no smoothing!) to a data set.

Parameters
  • regression_problem (TimeSeriesRegressionProblem) – Regression problem.

  • _previous_posterior (KalmanPosterior) – If specified, approximate Gaussian filtering and smoothing linearises at this, prescribed posterior. This is used for iterated filtering and smoothing. For standard filtering, this can be ignored.

Returns

  • KalmanPosterior – Posterior distribution of the filtered output

  • info_dicts – list of dictionaries containing filtering information

See also

TimeSeriesRegressionProblem

a regression problem data class

filtered_states_generator(regression_problem, _previous_posterior=None)[source]

Apply Gaussian filtering (no smoothing!) to a data set.

Parameters
  • regression_problem (TimeSeriesRegressionProblem) – Regression problem.

  • _previous_posterior (KalmanPosterior) – If specified, approximate Gaussian filtering and smoothing linearises at this, prescribed posterior. This is used for iterated filtering and smoothing. For standard filtering, this can be ignored.

Yields
  • filtrv – Random variable returned from prediction and update of the Kalman filter.

  • info_dict – Dictionary containing filtering information

See also

TimeSeriesRegressionProblem

a regression problem data class

filtsmooth(regression_problem, _previous_posterior=None)[source]

Apply Gaussian filtering and smoothing to a data set.

Parameters
  • regression_problem (TimeSeriesRegressionProblem) – Regression problem.

  • _previous_posterior (KalmanPosterior) – If specified, approximate Gaussian filtering and smoothing linearises at this, prescribed posterior. This is used for iterated filtering and smoothing. For standard filtering, this can be ignored.

Returns

  • KalmanPosterior – Posterior distribution of the filtered output

  • info_dicts – list of dictionaries containing filtering information

See also

TimeSeriesRegressionProblem

a regression problem data class

iterated_filtsmooth(regression_problem, init_posterior=None, stopcrit=None)[source]

Compute an iterated smoothing estimate with repeated posterior linearisation.

If the extended Kalman filter is used, this yields the IEKS. In any case, the result is an approximation to the maximum-a- posteriori estimate.

Parameters
Returns

Return type

SmoothingPosterior

See also

TimeSeriesRegressionProblem

a regression problem data class

iterated_filtsmooth_posterior_generator(regression_problem, init_posterior=None, stopcrit=None)[source]

Compute iterated smoothing estimates with repeated posterior linearisation.

If the extended Kalman filter is used, this yields the IEKS. In any case, the result is an approximation to the maximum-a- posteriori estimate.

Parameters
  • regression_problem (TimeSeriesRegressionProblem) – Regression problem.

  • init_posterior (Optional[SmoothingPosterior]) – Initial posterior to linearize at. Defaults to computing a (non-iterated) smoothing posterior, which amounts to linearizing at the prediction random variable.

  • stopcrit (StoppingCriterion) – A stopping criterion for iterated filtering.

Yields
  • SmoothingPosterior

  • info_dicts – list of dictionaries containing filtering information

See also

TimeSeriesRegressionProblem

a regression problem data class

smooth(filter_posterior, _previous_posterior=None)[source]

Apply Gaussian smoothing to the filtering outcome (i.e. a KalmanPosterior).

Parameters

filter_posterior (KalmanPosterior) – Posterior distribution obtained after filtering

Returns

Posterior distribution of the smoothed output

Return type

KalmanPosterior