diff --git a/src/alg_traits.jl b/src/alg_traits.jl index 26eea7d69..be7e23797 100644 --- a/src/alg_traits.jl +++ b/src/alg_traits.jl @@ -244,17 +244,24 @@ function alg_order(alg::AbstractODEAlgorithm) error("Order is not defined for this algorithm") end +EnumX.@enumx AlgorithmInterpretation Ito Stratonovich + """ -Integral interpolation for the SDE solver algorithm. SDEs solutions depend on the chosen definition of the stochastic integral. In the Ito calculus, -the left-hand rule is taken, while Stratonovich calculus uses the right-hand rule. Unlike in standard Riemannian integration, these integral rules do -not converge to the same answer. In the context of a stochastic differential equation, the underlying solution (and its mean, variance, etc.) is dependent -on the integral rule that is chosen. This trait describes which interpretation the solver algorithm subscribes to, and thus whether the solution should + alg_interpretation(alg) + +Integral interpolation for the SDE solver algorithm. SDEs solutions depend on the chosen definition of the stochastic integral. In the Ito calculus, +the left-hand rule is taken, while Stratonovich calculus uses the right-hand rule. Unlike in standard Riemannian integration, these integral rules do +not converge to the same answer. In the context of a stochastic differential equation, the underlying solution (and its mean, variance, etc.) is dependent +on the integral rule that is chosen. This trait describes which interpretation the solver algorithm subscribes to, and thus whether the solution should be interpretated as the solution to the SDE under the Ito or Stratonovich interpretation. For more information, see https://oatml.cs.ox.ac.uk/blog/2022/03/22/ito-strat.html as a good high-level explanation. !!! note - The expected solution statistics are dependent on this output. Solutions from solvers with different + + The expected solution statistics are dependent on this output. Solutions from solvers with different interpretations are expected to have different answers on almost all SDEs without additive noise. """ -function alg_interpretation end +function alg_interpretation(alg::AbstractSciMLAlgorithm) + error("Algorithm interpretation is not defined for this algorithm. It can be either `AlgorithmInterpretation.Ito` or `AlgorithmInterpretation.Stratonovich`") +end