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

automatic iterative determination of dt in tangent evolution #30

Open
RainerEngelken opened this issue Feb 10, 2018 · 3 comments
Open

Comments

@RainerEngelken
Copy link

RainerEngelken commented Feb 10, 2018

Currently, dt is a default value that can manually be changed. It would be great to have an initial short run of a system that iteratively tries different dt and computes the condition number of the resulting Q-matrix, until an acceptable value is reached. This could e.g. be done by iteratively multiplying dt This avoids loss of numerical precision (in case dt is too large) and avoids unnecessary computation (in case dt is too small). This is also good against climate change, in case you run lots of simulation or alternatively increases the number of simulations you can run using the same number of CPU hours ;-)


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@RainerEngelken RainerEngelken changed the title Feature proposal for speedup/better numerical accuracy: automatic determination of dt Feature proposal for speedup/better numerical accuracy: automatic iterative determination of dt Feb 10, 2018
@Datseris Datseris changed the title Feature proposal for speedup/better numerical accuracy: automatic iterative determination of dt automatic iterative determination of dt in tangent evolution Feb 24, 2018
@Datseris
Copy link
Member

This is also good against climate change, in case you run lots of simulation or alternatively increases the number of simulations you can run using the same number of CPU hours ;-)

Somebody give this man a medal, please!!!


@RainerEngelken can you give a bit more context here?

computes the condition number of the resulting Q-matrix

What is a "condition number" ?

until an acceptable value is reached

What value can pass as "acceptable"? How can we formulate this condition a bit more rigorously?

I agree with you that this is a good suggestion and will have performance gains.

@Datseris
Copy link
Member

From an API perspective, this seems very easy: It can happen during Ttr, the keyword argument that transiently evolves the system.

@RainerEngelken
Copy link
Author

RainerEngelken commented Feb 25, 2018

In our case, the condition number quantifies the ratio between the first and the kth singular value of Q or equally R, when you are calculating k Lyapunov exponents.
https://en.wikipedia.org/wiki/Condition_number
Basically, it measures how close to singular Q is.

The acceptable condition number depends on how many digits of accuracy you are willing to sacrifice. I guess for our case a condition number between 10^2 and 10^5 is acceptable, this corresponds to ~ 2-5 digits of accuracy lost during the QR-decomposition. Given that Lyapunov exponents anyway only converge $\propto \frac{1}{\sqrt{N}}$, where $N$ is the number of iterations or time steps, I guess that a loss of the last 2 to 5 digits is acceptable. I have examined this only rigorously for my favorite kinds of systems (spiking and firing rate networks), it might be good to play around with the convergence of some other dynamical systems before hard coding such a number ;-)

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

No branches or pull requests

2 participants