simulate_ornstein_uhlenbeck
simulate_ornstein_uhlenbeck(Om, D, m0, S0, nsamples, ndim, Dt, K, dt=0.006)
Simulate snapshots from a linear Ornstein-Uhlenbeck process.
Legacy: kept for backward compatibility with existing tests and examples. New code
should use :func:sample_ornstein_uhlenbeck, which samples the exact Gaussian laws
(no time-discretization error) for any initial covariance.
Parameters:
-
Om(ndarray of shape (ndim, ndim)) –Drift matrix.
-
D(ndarray of shape (ndim, ndim)) –Diffusion matrix.
-
m0(ndarray of shape (ndim,)) –Mean of the initial Gaussian distribution.
-
S0(float) –Isotropic variance factor for the initial covariance
S0 * I. -
nsamples(int) –Number of particles sampled at each snapshot time.
-
ndim(int) –State dimension.
-
Dt(float) –Snapshot interval in simulation time.
-
K(int) –Number of snapshots.
-
dt(float, default:0.006) –Euler-Maruyama integration step.
Returns:
-
samples(list of length K) –samples[k]is an ndarray of shape(nsamples, ndim). -
tt(ndarray of shape (K,)) –Snapshot times.