Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add AlgorithmInterpretation #777

Merged
merged 2 commits into from
Aug 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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.

Check warning on line 256 in src/alg_traits.jl

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"interpretated" should be "interpreted".

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
Loading