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

Non-diagonal noise support #100

Open
sho7014 opened this issue Sep 8, 2021 · 8 comments
Open

Non-diagonal noise support #100

sho7014 opened this issue Sep 8, 2021 · 8 comments

Comments

@sho7014
Copy link

sho7014 commented Sep 8, 2021

Hello,

SDEs with non-diagonal noise:
https://diffeq.sciml.ai/stable/tutorials/sde_example/#Example-4:-Systems-of-SDEs-with-Non-Diagonal-Noise
give rise to assersion error trapped at L91 of:
https://github.com/PIK-ICoNe/NetworkDynamics.jl/blob/57635388611caddabc47f7bfd64899b3aaf1f1c8/src/nd_ODE_Static.jl

I would appreciate it if you could add support or suggest a workaround.

@sho7014
Copy link
Author

sho7014 commented Sep 9, 2021

I have made some workaround.
https://github.com/sho7014/NetworkDynamics.jl
A struct NonDiagonalSDEVertex is introduced to deal with non-diagonal noise.
Both node-dependent/independent non-diagonal noise can be handled.
This is just a naive workaround, so its performance has not been examined and important features such as sparse arrays for 'noise_rate_prototype' are not supported.

@lindnemi
Copy link
Collaborator

Thank you for raising this issue and providing a workaround. I just returned from holiday and will look into this problem within the next weeks.

@lindnemi
Copy link
Collaborator

lindnemi commented Oct 1, 2021

Just to clarify: Do you want "local, non-diagonal" noise at each vertex, or should noise terms at different vertices interact with each other as well?

@lindnemi
Copy link
Collaborator

lindnemi commented Oct 1, 2021

For the first case I would suggest to construct the noise function g directly, i.e. without using network_dynamics since the whole Edge handling is then not necessary (and neither are internal states). Instead the noise matrix could directly be assembled from noise vertices.

It might then make sense to define a new constructor that directly assembles a NetworkNoise function out of the NonDiagonalSDEVertices that you defined.

@sho7014
Copy link
Author

sho7014 commented Oct 2, 2021

I would like to use the first one, hence your suggestion:

to construct the noise function g directly, i.e. without using network_dynamics since the whole Edge handling is then not necessary (and neither are internal states)

would suffice. I had a strong bias that I had to introduce a second graph layer.

@sho7014
Copy link
Author

sho7014 commented Oct 2, 2021

Should I close the issue? I am new to this kind of communities so have not yet been sure of the conventions.

@lindnemi
Copy link
Collaborator

lindnemi commented Oct 2, 2021

I'll leave it open for now, since the issue is not entirely fixed. For once, it would be nice to have such a network_noise constructor in the package, though i don't know when i will find the time to implement it. If you want to tackle the problem and open a pull request, that would be very welcome.

On the other hand, we recommend the approach with "the second graph layer" in our tutorials when sometimes it would be more straightforward to implement g directly. So the tutorials should be expanded.

When these thing are done, i will close the issue.

@sho7014
Copy link
Author

sho7014 commented Oct 2, 2021

I agree with the idea that such network_noise constructor would be nice. I would also like to work on it when I have time.

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

No branches or pull requests

2 participants