TransportMaps.Algorithms.SequentialInference.LinearSequentialInference
¶
Module Contents¶
Classes¶
Perform the on-line filtering of a sequential linear Gaussian Hidden Markov chain. |
|
Perform the on-line assimilation of a sequential linear Gaussian Hidden Markov chain. |
- class TransportMaps.Algorithms.SequentialInference.LinearSequentialInference.LinearFilter(ders=0, pi_hyper=None)[source]¶
Bases:
TransportMaps.Algorithms.SequentialInference.SequentialInferenceBase.Filter
Perform the on-line filtering of a sequential linear Gaussian Hidden Markov chain.
Aka: Kalman filter.
If the linear state-space model is parametric, i.e.
\[\begin{split}{\bf Z}_{k+1} = {\bf c}_k(\theta) + {\bf F}_k(\theta){\bf Z}_k + {\bf w}_k(\theta) \\ {\bf Y}_{k} = {\bf H}_k(\theta){\bf Z}_k + {\bf v}_k(\theta)\end{split}\]then one can optionally compute the gradient (with respect to the parameters) of the filter.
- Parameters:
ders (int) –
0
no gradient is computed,1
compute gradientpi_hyper (
Distribution
) – prior distribution on the hyper-parameters \(\pi(\Theta)\)
Todo
Square-root filter
- property marginal_log_likelihood[source]¶
Returns the marginal log-likelihood \(\log\pi\left({\bf Y}_{\Xi\leq k}\right)\)
- Returns:
(
float
) – current marginal likelihood
- property filtering_covariance_list[source]¶
Returns the covariances of all the filtering distributions
- property grad_marginal_log_likelihood[source]¶
Returns the gradient of the marginal log-likelihood \(\nabla_\theta\log\pi\left({\bf Y}_{\Xi\leq k}\right)\)
- Returns:
(
float
) – current marginal likelihood
- property filtering_grad_mean_list[source]¶
Returns the gradient of the means of all the filtering distributions
- class TransportMaps.Algorithms.SequentialInference.LinearSequentialInference.LinearSmoother(lag=None)[source]¶
Bases:
LinearFilter
,TransportMaps.Algorithms.SequentialInference.SequentialInferenceBase.Smoother
Perform the on-line assimilation of a sequential linear Gaussian Hidden Markov chain.
- Parameters:
lag (
numpy.float
) – lag to be used in the backward updates of smoothing means and covariances. The default valueNone
indicates infinite lag.
Todo
no hyper-parameter admitted right now.
- _assimilation_step()[source]¶
Assimilate one piece of Gaussian data \(\left( \pi\left({\bf Z}_{k+1} \middle\vert {\bf Z}_k \right), \log \mathcal{L}\left({\bf y}_{k+1}\middle\vert {\bf Z}_{k+1}\right) \right)\).