LinearSDEModel

class probnum.filtsmooth.LinearSDEModel(driftmatrixfct, forcfct, dispmatrixfct, diffmatrix)

Bases: probnum.filtsmooth.ContinuousModel

Linear, continuous-time Markov models given by the solution of the linear stochastic differential equation (SDE),

\[d x_t = G(t) x_t d t + d w_t.\]

Note: for Gaussian initial conditions, this solution is a Gaussian process.

Parameters:
  • driftmatrixfct (callable, signature=(t, **kwargs)) – This is F = F(t). The evaluations of this function are called the drift(matrix) of the SDE. Returns np.ndarray with shape=(n, n)
  • forcfct (callable, signature=(t, **kwargs)) – This is u = u(t). Evaluations of this function are called the force(vector) of the SDE. Returns np.ndarray with shape=(n,)
  • dispmatrixfct (callable, signature=(t, **kwargs)) – This is L = L(t). Evaluations of this function are called the dispersion(matrix) of the SDE. Returns np.ndarray with shape=(n, s)
  • diffmatrix (np.ndarray, shape=(s, s)) – This is the diffusion matrix Q of the Brownian motion. It is always a square matrix and the size of this matrix matches the number of columns of the dispersionmatrix.

Notes

If initial conditions are Gaussian, the solution is a Gauss-Markov process. We assume Gaussianity for chapmankolmogorov().

Attributes Summary

diffusionmatrix Evaluates Q.
dimension Spatial dimension (utility attribute).

Methods Summary

__call__(arr_or_rv, RandomVariable], start, …) Transition a random variable or a realization of one.
dispersion(time, state, **kwargs) Evaluates l(t, x(t)) = L(t).
drift(time, state, **kwargs) Evaluates f(t, x(t)) = F(t) x(t) + u(t).
jacobian(time, state, **kwargs) maps t -> F(t)
transition_realization(real, start, stop, …) Transition a realization of a random variable from time \(t\) to time \(t+\Delta t\).
transition_rv(rv, start, stop, **kwargs) Transition a random variable from time \(t\) to time \(t+\Delta t\).

Attributes Documentation

diffusionmatrix

Evaluates Q.

dimension

Spatial dimension (utility attribute).

Methods Documentation

__call__(arr_or_rv: Union[numpy.ndarray, RandomVariable], start: float = None, stop: float = None, **kwargs) -> ('RandomVariable', typing.Dict)

Transition a random variable or a realization of one.

The input is either interpreted as a random variable or as a realization. Accordingly, the respective methods are called: transition_realization() or transition_rv().

dispersion(time, state, **kwargs)[source]

Evaluates l(t, x(t)) = L(t).

drift(time, state, **kwargs)[source]

Evaluates f(t, x(t)) = F(t) x(t) + u(t).

jacobian(time, state, **kwargs)[source]

maps t -> F(t)

transition_realization(real, start, stop, **kwargs)[source]

Transition a realization of a random variable from time \(t\) to time \(t+\Delta t\).

For random variable \(x_t\), it returns the random variable defined by

\[x_{t + \Delta t} \sim p(x_{t + \Delta t} | x_t = r) .\]

This is different to transition_rv() which computes the parametrization of \(x_{t + \Delta t}\) based on the parametrization of \(x_t\).

Nb: Think of transition as a verb, i.e. this method “transitions” a realization of a random variable.

Parameters:
  • real – Realization of the random variable.
  • start – Starting point \(t\).
  • stop – End point \(t + \Delta t\).
Returns:

  • RandomVariable – Random variable, describing the state at time \(t + \Delta t\) based on realization at time \(t\).
  • dict – Additional information in form of a dictionary, for instance the cross-covariance in the prediction step, access to which is useful in smoothing.

See also

transition_rv()
Apply transition to a random variable.
transition_rv(rv, start, stop, **kwargs)[source]

Transition a random variable from time \(t\) to time \(t+\Delta t\).

For random variable \(x_t\), it returns the random variable defined by

\[x_{t + \Delta t} \sim p(x_{t + \Delta t} | x_t) .\]

This returns a random variable where the parametrization depends on the paramtrization of \(x_t\). This is different to transition_rv() which computes the parametrization of \(x_{t + \Delta t}\) based on a realization of \(x_t\).

Nb: Think of transition as a verb, i.e. this method “transitions” a random variable.

Parameters:
  • rv – Realization of the random variable.
  • start – Starting point \(t\).
  • stop – End point \(t + \Delta t\).
Returns:

  • RandomVariable – Random variable, describing the state at time \(t + \Delta t\) based on realization at time \(t\).
  • dict – Additional information in form of a dictionary, for instance the cross-covariance in the prediction step, access to which is useful in smoothing.

See also

transition_realization()
Apply transition to a realization of a random variable.