markovflow.kernels.periodic
Module containing a periodic kernel.
HarmonicOscillator
Bases: markovflow.kernels.sde_kernel.StationaryKernel
markovflow.kernels.sde_kernel.StationaryKernel
Represents a periodic kernel. The definition is in the paper “Explicit Link Between Periodic Covariance Functions and State Space Models”.
This kernel has the formula:
…where:
\(σ²\) is a kernel parameter, representing the constant variance this kernel introduces \(p\) is the period of the oscillator in radius
\(σ²\) is a kernel parameter, representing the constant variance this kernel introduces
\(p\) is the period of the oscillator in radius
The transition matrix \(F\) in the SDE form for this kernel is:
…where \(λ = 2π / period\).
Covariance for the steady state is:
The state transition matrix is:
The process covariance is:
variance – Initial variance for the kernel. Must be a positive float.
period – The period of the Harmonic oscillator, in radius. Must be a positive float.
output_dim – The output dimension of the kernel.
jitter – A small non-negative number used to make sure that matrix inversion is numerically stable.
_lambda
λ the scalar used elsewhere in the docstrings
state_dim
Return the state dimension of the generated StateSpaceModel.
StateSpaceModel
state_transitions
Return the state transition matrices of the kernel.
The state transition matrix at time step \(k\) is:
Because this is a stationary kernel, transition_times is ignored.
transition_times
transition_times – A tensor of times at which to produce matrices, with shape batch_shape + [num_transitions]. Ignored.
batch_shape + [num_transitions]
time_deltas – A tensor of time gaps for which to produce matrices, with shape batch_shape + [num_transitions].
A tensor with shape batch_shape + [num_transitions, state_dim, state_dim].
batch_shape + [num_transitions, state_dim, state_dim]
process_covariances
The process covariance for time step k is:
feedback_matrix
Return the feedback matrix \(F\). This is where:
For this kernel, note that:
A tensor with shape [state_dim, state_dim].
[state_dim, state_dim]
steady_state_covariance
Return the initial covariance of the generated StateSpaceModel.
The steady state covariance \(P∞\) is given by:
variance
Return the variance parameter. This is a GPflow Parameter.
period
Return the period parameter. This is a GPflow Parameter.