https://github.com/avik-pal/stochasticdiffeq.jl
Solvers for stochastic differential equations which connect with the scientific machine learning (SciML) ecosystem
Science Score: 18.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.7%) to scientific vocabulary
Repository
Solvers for stochastic differential equations which connect with the scientific machine learning (SciML) ecosystem
Basic Info
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
- Releases: 0
Metadata Files
README.md
StochasticDiffEq.jl
StochasticDiffEq.jl is a component package in the DifferentialEquations ecosystem. It holds the stochastic differential equations solvers and utilities. While completely independent and usable on its own, users interested in using this functionality should check out DifferentialEquations.jl.
API
StochasticDiffEq.jl is part of the JuliaDiffEq common interface, but can be used independently of DifferentialEquations.jl. The only requirement is that the user passes an StochasticDiffEq.jl algorithm to solve. For example, we can solve the SDE tutorial from the docs using the SRIW1() algorithm:
julia
using StochasticDiffEq
α=1
β=1
u₀=1/2
f(u,p,t) = α*u
g(u,p,t) = β*u
dt = 1//2^(4)
tspan = (0.0,1.0)
prob = SDEProblem(f,g,u₀,(0.0,1.0))
sol =solve(prob,SRIW1())
The options for solve are defined in the common solver options page and are thoroughly explained in the ODE tutorial.
That example uses the out-of-place syntax f(u,p,t), while the inplace syntax (more efficient for systems of equations) is shown in the Lorenz example:
```julia function lorenz(du,u,p,t) du[1] = 10.0(u[2]-u[1]) du[2] = u[1](28.0-u[3]) - u[2] du[3] = u[1]u[2] - (8/3)*u[3] end
function σ_lorenz(du,u,p,t) du[1] = 3.0 du[2] = 3.0 du[3] = 3.0 end
probsdelorenz = SDEProblem(lorenz,σlorenz,[1.0,0.0,0.0],(0.0,10.0)) sol = solve(probsde_lorenz) plot(sol,vars=(1,2,3)) ```
The problems default to diagonal noise. Non-diagonal noise can be added by setting
the noise_prototype:
julia
f = (du,u,p,t) -> du.=1.01u
g = function (du,u,p,t)
du[1,1] = 0.3u[1]
du[1,2] = 0.6u[1]
du[1,3] = 0.9u[1]
du[1,4] = 0.12u[2]
du[2,1] = 1.2u[1]
du[2,2] = 0.2u[2]
du[2,3] = 0.3u[2]
du[2,4] = 1.8u[2]
end
prob = SDEProblem(f,g,ones(2),(0.0,1.0),noise_rate_prototype=zeros(2,4))
Colored noise can be set using an AbstractNoiseProcess. For example, we can set the underlying noise process to a GeometricBrownianMotionProcess via:
```julia μ = 1.0 σ = 2.0 W = GeometricBrownianMotionProcess(μ,σ,0.0,1.0,1.0)
...
Define f,g,u0,tspan for a SDEProblem
...
prob = SDEProblem(f,g,u0,tspan,noise=W) ```
StochasticDiffEq.jl also handles solving random ordinary differential equations. This is shown in the RODE tutorial.
julia
using StochasticDiffEq
function f(u,p,t,W)
2u*sin(W)
end
u0 = 1.00
tspan = (0.0,5.0)
prob = RODEProblem(f,u0,tspan)
sol = solve(prob,RandomEM(),dt=1/100)
Available Solvers
For the list of available solvers, please refer to the DifferentialEquations.jl SDE Solvers page and the RODE Solvers page.
Owner
- Name: Avik Pal
- Login: avik-pal
- Kind: user
- Location: Cambridge, MA
- Company: Massachusetts Institute of Technology
- Website: https://avik-pal.github.io
- Twitter: avikpal1410
- Repositories: 46
- Profile: https://github.com/avik-pal
PhD Student @mit || Prev: BTech CSE IITK
Citation (CITATION.bib)
@article{DifferentialEquations.jl-2017,
author = {Rackauckas, Christopher and Nie, Qing},
doi = {10.5334/jors.151},
journal = {The Journal of Open Research Software},
keywords = {Applied Mathematics},
note = {Exported from https://app.dimensions.ai on 2019/05/05},
number = {1},
pages = {},
title = {DifferentialEquations.jl – A Performant and Feature-Rich Ecosystem for Solving Differential Equations in Julia},
url = {https://app.dimensions.ai/details/publication/pub.1085583166 and http://openresearchsoftware.metajnl.com/articles/10.5334/jors.151/galley/245/download/},
volume = {5},
year = {2017}
}
@article{rackauckas2017adaptive,
title={Adaptive methods for stochastic differential equations via natural embeddings and rejection sampling with memory},
author={Rackauckas, Christopher and Nie, Qing},
journal={Discrete and continuous dynamical systems. Series B},
volume={22},
number={7},
pages={2731},
year={2017},
publisher={NIH Public Access}
}
GitHub Events
Total
Last Year
Dependencies
- actions/cache v1 composite
- actions/checkout v2 composite
- codecov/codecov-action v1 composite
- julia-actions/julia-buildpkg v1 composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/julia-runtest v1 composite
- julia-actions/setup-julia v1 composite
- actions/checkout v2 composite
- julia-actions/julia-buildpkg latest composite
- julia-actions/setup-julia v1 composite
- JuliaRegistries/TagBot v1 composite
- actions/checkout v2 composite
- julia-actions/setup-julia v1 composite