probnum.diffeq.odefilter.init_routines¶
Initialization routines for ODE filters.
You may use the following (rough) guidelines to choose a suitable strategy for low(ish) dimensional ODEs.
num_derivatives = 1
:Stack
num_derivatives = 2
:StackWithJacobian
if a Jacobian is available, orNonProbabilisticFit
if not. If Jax is available, compute the Jacobian and useStackWithJacobian
, (or chooseForwardModeJVP
altogether).num_derivatives = 3,4,5
:NonProbabilisticFitWithJacobian
if the Jacobian of the ODE vector field is available, orNonProbabilisticFit
if not.num_derivatives > 5
:TaylorMode
. For orders 6 and 7,ForwardModeJVP
might work well too.TaylorMode
shines fornum_derivatives >> 5
.
Initialization routines for high-dimensional ODEs are not implemented efficiently yet.
It may also be worth noting:
Only automatic-differentiation-based routines yield the exact initialization. This becomes more desirable, the larger the number of modelled derivatives is.
ForwardModeJVP
is generally more efficient thanForwardMode
. The jury is still out on the efficiency ofReverseMode
.Stack
andStackWithJacobian
are the only routines that come essentially for free. The other routines rely on either inference or automatic differentiation.For stiff ODEs, prefer
NonProbabilisticFitWithJacobian
withBDF
orRadau
overNonProbabilisticFit
(or use one of the automatic-differentiation-based routines).Initialization routines can be chained together. For example, build a
prior_process
with aninitrv
that is generated byStackWithJacobian
, and initialize the ODE filter withNonProbabilisticFitWithJacobian
.
Classes¶
|
Initialization routines for a filtering-based ODE solver. |
|
Initialization by stacking y0, f(y0). |
|
Initialization by stacking y0, f(y0), and df(y0). |
|
Fit the prior process to a few steps of a non-probabilistic solver. |
|
Fit the prior process to a few steps of a non-probabilistic solver and use Jacobians. |
Initialization via forward-mode automatic differentiation. |
|
Initialization via Jacobian-vector-product-based automatic differentiation. |
|
Initialization via reverse-mode automatic differentiation. |
|
Initialize a probabilistic ODE solver with Taylor-mode automatic differentiation. |