TransportMaps.Distributions.Examples.InertialNavigationSystem.INSDistributions

Module Contents

Classes

Prior

Multivariate Gaussian distribution \(\mathcal{N}(\mu,\Sigma)\)

Transition

Transition probability distribution \(g({\bf x}_{k-1},{\bf x}_k) = \pi_{{\bf X}_k \vert {\bf X}_{k-1}={\bf x}_{k-1}}({\bf x}_k) = \pi({\bf x}_k - F_k {\bf x}_{k-1} - {\bf c}_k)\) where \(\pi \sim \mathcal{N}(\mu_k,Q_k)\).

LogLikelihood

Define the log-likelihood for the additive linear Gaussian model

Functions

generate_data(nsteps)

class TransportMaps.Distributions.Examples.InertialNavigationSystem.INSDistributions.Prior[source]

Bases: TransportMaps.Distributions.FrozenDistributions.NormalDistribution

Multivariate Gaussian distribution \(\mathcal{N}(\mu,\Sigma)\)

Parameters:
  • mu (ndarray [\(d\)]) – mean vector \(\mu\)

  • covariance (ndarray [\(d,d\)]) – covariance matrix \(\Sigma\)

  • precision (ndarray [\(d,d\)]) – precision matrix \(\Sigma^{-1}\)

  • square_root_covariance (ndarray [\(d,d\)]) – square root \(\Sigma^{\frac{1}{2}}\)

  • square_root_precision (ndarray [\(d,d\)]) – square root \(\Sigma^{-\frac{1}{2}}\)

  • square_root_type (str) – type of square root to be used in case covariance or precision``were provided. For ``square_root_type=='sym', \(L=U\Lambda^{\frac{1}{2}}U^T\) where \(\Sigma = U\Lambda U^T\) is the eigenvalue decomposition of \(\Sigma\). For square_root_type=='tri' or square_root_type=='chol', :maht:`L=C` where \(\Sigma=CC^T\) is the Cholesky decomposition of \(\Sigma\). For square_root_type=='kl', \(L=U\Lambda^{\frac{1}{2}}\) where \(\Sigma = U\Lambda U^T\) is the eigenvalue decomposition of \(\Sigma\) (this corresponds to the Karuenen-Loeve expansion). The eigenvalues and eigenvectors are ordered with \(\lambda_i\geq\lambda_{i+1}\). If the parameter square_root is provided, then the square_root_type attribute will be set user.

Note

The arguments covariance, precision and square_root are mutually exclusive.

class TransportMaps.Distributions.Examples.InertialNavigationSystem.INSDistributions.Transition[source]

Bases: TransportMaps.Distributions.Decomposable.LinearGaussianSequentialInferenceDistributions.LinearNormalAR1TransitionDistribution

Transition probability distribution \(g({\bf x}_{k-1},{\bf x}_k) = \pi_{{\bf X}_k \vert {\bf X}_{k-1}={\bf x}_{k-1}}({\bf x}_k) = \pi({\bf x}_k - F_k {\bf x}_{k-1} - {\bf c}_k)\) where \(\pi \sim \mathcal{N}(\mu_k,Q_k)\).

This represents the following Markov transition model:

\[\begin{split}{\bf x}_k = c_k + F_k {\bf x}_{k-1} + {\bf w}_k \\ {\bf w}_k \sim \mathcal{N}(\mu,Q_k)\end{split}\]

where the control \({\bf c}_k := B_k {\bf u}_k\) can be used for control purposes

Parameters:
  • ck (ndarray [\(d\)] or Map) – constant part or map returning the constant part given some parameters

  • Fk (ndarray [\(d,d\)] or Map) – state transition matrix (dynamics) or map returning the linear part given some parametrs

  • mu (ndarray [\(d\)] or Map) – mean \(\mu_k\) or parametric map for \(\mu_k(\theta)\)

  • covariance (ndarray [\(d,d\)] or Map) – covariance \(Q_k\) or parametric map for \(Q_k(\theta)\)

  • precision (ndarray [\(d,d\)] or Map) – precision \(Q_k^{-1}\) or parametric map for \(Q_k^{-1}(\theta)\)

class TransportMaps.Distributions.Examples.InertialNavigationSystem.INSDistributions.LogLikelihood(y)[source]

Bases: TransportMaps.Likelihoods.LikelihoodBase.AdditiveLinearNormalLogLikelihood

Define the log-likelihood for the additive linear Gaussian model

The model is

\[{\bf y} = {\bf c} + {\bf T}{\bf x} + \varepsilon \;, \quad \varepsilon \sim \mathcal{N}(\mu, \Sigma)\]

where \(T \in \mathbb{R}^{d_y \times d_x}\), \(\mu \in \mathbb{R}^{d_y}\) and \(\Sigma \in \mathbb{R}^{d_y \times d_y}\) is symmetric positve definite

Parameters:
  • y (ndarray [\(d_y\)]) – data

  • c (ndarray [\(d_y\)] or Map) – system constant or parametric map returning the constant

  • T (ndarray [\(d_y,d_x\)] or Map) – system matrix or parametric map returning the system matrix

  • mu (ndarray [\(d_y\)] or Map) – noise mean or parametric map returning the mean

  • covariance (ndarray [\(d_y,d_y\)] or Map) – noise covariance or parametric map returning the covariance

  • precision (ndarray [\(d_y,d_y\)] or Map) – noise precision matrix or parametric map returning the precision matrix

TransportMaps.Distributions.Examples.InertialNavigationSystem.INSDistributions.generate_data(nsteps)[source]