markovflow.kernels.latent_exp_generated

Module containing the LEG-GPs family of kernels.

Module Contents

class LatentExponentiallyGenerated(N: tf.Tensor, R: tf.Tensor, jitter: float = 0.0)[source]

Bases: markovflow.kernels.sde_kernel.StationaryKernel

Represents the LEG-GPs kernel.

This kernel defines an SDE with state dimension \(d\), whose dynamics are governed by:

\[dx = -½ G x dt + N dw (w Brownian motion)\]

…with \(G = N Nᵀ + R - Rᵀ\), and \(N, R\) both arbitrary square matrices of size \(d × d\).

Note that:

  • \(C = R - Rᵀ\) is skew symmetric \((Cᵀ = -C)\)

  • If \(d\) is even, \(C\) has imaginary conjugate eigenvalue pairs \((iλ₁ ,-iλ₁, ...)\)

  • \(expm(C)\) is an orthogonal matrix (specifying an isometry)

The key reference is:

@article{loper2020general,
    title={General linear-time inference for Gaussian Processes on one dimension},
    author={Loper, Jackson and Blei, David and Cunningham, John P and Paninski, Liam},
    journal={arXiv preprint arXiv:2003.05554},
    year={2020}

}

Parameters
  • N – The Noise mixing matrix.

  • R – The Rotation inducing matrix.

  • jitter – A small non-negative number to add into a matrix’s diagonal to maintain numerical stability during inversion.

property state_dimint[source]

Return the state dimension.

state_transitions(transition_times: tf.Tensor, time_deltas: tf.Tensor)tf.Tensor[source]

Obtain the state transition matrices. That is:

\[Aₖ = expm[-½G Δtₖ]\]
Parameters
  • transition_times – Time points at which to produce matrices, with shape batch_shape + [num_transitions].

  • time_deltas – Time gaps for which to produce matrices, with shape batch_shape + [num_transitions].

Returns

A tensor of shape batch_shape + [num_transitions, state_dim, state_dim]

property feedback_matrixtf.Tensor[source]

Return the feedback matrix.

Here, this is \(F (=-G/2)\) with shape \(d × d\).

property steady_state_covariancetf.Tensor[source]

Obtain the steady state covariance \(P∞ = I\).

Returns

A tensor with shape [state_dim, state_dim].

process_covariances(transition_times: tf.Tensor, time_deltas: tf.Tensor)tf.Tensor[source]

Obtain the process covariance at time \(k\). This is calculated as:

\[Qₖ = P∞ - Aₖ P∞ Aₖᵀ = I - Aₖ Aₖᵀ\]
Parameters
  • transition_times – Time points at which to produce matrices, with shape batch_shape + [num_transitions].

  • time_deltas – Time gaps for which to produce matrices, with shape batch_shape + [num_transitions].

Returns

A tensor with shape batch_shape + [num_transitions, state_dim, state_dim].