Dynamic model
We use a dynamic model based on ODEs, fitted in a statistical framework. Specifically, we solve multiple ODEs, using each observed value as the initial value and averaging the solutions using time-dependent inverse-variance weights. We thus obtain to obtain an unbiased minimum variance estimator of the true underlying dynamics. With this approach, we reduce dependence on the initial condition and increase robustness to noise, yet maintain a local perspective and mechanistic interpretation.
For modeling with a larger number of variables, we integrate the dynamic model in the latent space of a VAE for flexible non-linear dimension reduction, reflecting the assumption of a lower-dimensional underlying dynamic process driving the observed measurements.
LatentDynamics.generalsolution — Methodgeneralsolution(t, x0::Vector{Float32}, A::Matrix{Float32}, c::Vector{Float32})Calculates the analytical solution of a linear system of ODEs with constant coefficients at a time point t, for a system matrix A, a constant vector c and an initial value x0.
Returns the solution x(t) and the matrix exponential e^{At}.
LatentDynamics.generalsolution — Methodgeneralsolution(t, x0::Vector{Float32}, c::Vector{Float32})Calculates the analytical solution of a constant system of ODEs at a time point t, for a constant vector c and an initial value x0.
Returns the solution x(t) and the matrix exponential e^{At} = 1.0.
LatentDynamics.params_fullinhomogeneous — Functionparams_fullinhomogeneous(p::Vector{Float32})Returns the system matrix A and the constant vector c of a 2D inhomogeneous linear system with 6 parameters specified by the input vector p = [a11, a12, a21, a22, c1, c2].
LatentDynamics.params_offdiagonalinhomogeneous — Functionparams_offdiagonalinhomogeneous(p::Vector{Float32})Returns the system matrix A and the constant vector c of a 2D inhomogeneous linear system where the system matrix has only off-diagonal elements (i.e., diagonal entries are zero), specified by the input vector p = [a12, a21, c1, c2].
LatentDynamics.params_diagonalinhomogeneous — Functionparams_diagonalinhomogeneous(p::Vector{Float32})Returns the system matrix A and the constant vector c of a 2D inhomogeneous linear system where the system matrix is diagonal, specified by the input vector p = [a11, a22, c1, c2].
LatentDynamics.params_fullhomogeneous — Functionparams_fullhomogeneous(p::Vector{Float32})Returns the system matrix A and the constant vector c of a 2D homogeneous linear system with 4 parameters specified by the input vector p = [a11, a12, a21, a22], and c = [0, 0].
LatentDynamics.params_diagonalhomogeneous — Functionparams_offdiagonalhomogeneous(p::Vector{Float32})Returns the system matrix A and the constant vector c of a 2D homogeneous linear system where the system matrix is diagonal, specified by the input vector p = [a11, a22], and c = [0, 0].
LatentDynamics.params_driftonly — Functionparams_driftonly(p::Vector{Float32})Returns the constant vector c of a 2D inhomogeneous linear system where the system matrix is zero, specified by the input vector p = [c1, c2].