A computer-implemented method comprising: from each of multiple trials, obtaining a respective series of observations y(t) of a subject over time t; using a variational auto encoder to model an ordinary differential equation, ODE, wherein the variational auto encoder comprises an encoder for encoding the observations into a latent vector z and a decoder for decoding the latent vector, the encoder comprising a first neural network and the decoder comprising one or more second neural networks, wherein the ODE as modelled by the decoder has a state x(t) representing one or more physical properties of the subject which result in the observations y, and the decoder models a rate of change of x with respect to time t as a function f of at least x and z: dx/dt=f(x, z); and operating the variational auto encoder to learn the function f based on the obtained observations y.