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

Correlated SDE test #113

Open
oameye opened this issue Aug 1, 2024 · 2 comments
Open

Correlated SDE test #113

oameye opened this issue Aug 1, 2024 · 2 comments
Labels
consistency documentation Improvements or additions to documentation

Comments

@oameye
Copy link
Member

oameye commented Aug 1, 2024

using DynamicalSystemsBase, StochasticDiffEq, DiffEqNoiseProcess
using CairoMakie

ρ = 0.3
Σ = [1 ρ; ρ 1]
t0 = 0.0; W0 = zeros(2); Z0 = zeros(2);
W = CorrelatedWienerProcess(Σ, t0, W0, Z0)

zero!(du, u, p, t) = du .= 0.0 # deterministic part
sde = CoupledSDEs(zero!, idfunc!, zeros(2), nothing, σ; noise=W)
Y, t = trajectory(sde, 1000.0, zeros(2))

fig = Figure()
ax = Axis(fig[1,1], limits = (-0.5,0.5, -0.5, 0.5))
scatter!(ax, diff(Matrix(Y)', dims=2))
fig

Check that values are correlated.

@oameye oameye changed the title Correlated SDE Correlated SDE test Oct 6, 2024
@reykboerner
Copy link
Collaborator

Now in v0.4.0, writing sde = CoupledSDEs(zero!, zeros(2); noise_process = W) returns the error

ArgumentError: CoupledSDEs does not support correlation between noise processes through DiffEqNoiseProcess.jl interface. Instead, use the `covariance` kwarg of `CoupledSDEs`.

This is what we want so that we can extract the covariance_matrix later, right? But we should note it in the docs.

@oameye oameye added the documentation Improvements or additions to documentation label Oct 12, 2024
@oameye
Copy link
Member Author

oameye commented Oct 12, 2024

Yes exactly, in Sciml their are multiple ways. We opted to only have one, to be concistent. Good idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consistency documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants