Kalman¶
- class probnum.filtsmooth.gaussian.Kalman(prior_process)¶
Bases:
BayesFiltSmooth
Gaussian filtering and smoothing, i.e. Kalman-like filters and smoothers.
- Parameters
prior_process (MarkovProcess) – Prior Gauss-Markov process. Usually a
MarkovProcess
with aNormal
initial random variable, and anLTISDE
transition or anIntegratorTransition
, butLinearSDE
,ContinuousEKFComponent
, orContinuousUKFComponent
are also valid. Describes a random process in \(K\) dimensions. If the transition is an integrator, K=d*(nu+1) for some d and nu.
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.
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 (Optional[TimeSeriesPosterior]) – 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 (Optional[TimeSeriesPosterior]) – 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.
- Raises
ValueError – If time-points are not sorted or not disjoint.
- 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 (Optional[TimeSeriesPosterior]) – 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
regression_problem (TimeSeriesRegressionProblem) – Regression problem.
init_posterior (Optional[SmoothingPosterior]) – Initial posterior to linearize at. If not specified, linearizes at the prediction random variable.
stopcrit (Optional[FiltSmoothStoppingCriterion]) – A stopping criterion for iterated filtering.
- Returns
Iterated smoothing posterior.
- Return type
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 (Optional[FiltSmoothStoppingCriterion]) – 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
_previous_posterior (Optional[TimeSeriesPosterior]) –
- Returns
Posterior distribution of the smoothed output
- Return type