Skip to content

Commit

Permalink
Merge pull request #777 from prbzrg/Add-AlgorithmInterpretation
Browse files Browse the repository at this point in the history
add `AlgorithmInterpretation`
  • Loading branch information
ChrisRackauckas authored Aug 31, 2024
2 parents c0c6008 + 4bf01f7 commit a1cc13a
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/alg_traits.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a1cc13a

Please sign in to comment.