-
Notifications
You must be signed in to change notification settings - Fork 6
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
Match attractors by BasinEnclosure #133
Comments
Continuing the discussion here to stay focused, from #132 (comment)
Hm, but is it really a benefit to add a new function? I am not sure. The more functions you add, the more complicated the API of a software is. At the moment we already have in place the concept of a matcher, and the function that matches ( In contrast, with the proposal of PR #132 a new basin enclosure method (or any other matching method) does not have to change the continuation or matching functions. If you have a look at the declared API of Crucially, you don't have to implement Here is how it should work: first, the new matcher The whole
loop is unecessary, as this is taken care of by Does this sound good to you? |
Also, there is no reason to have |
How would you manage to keep track of the endpoint-integrated trajectories without changing the continuation code, though? I'd be very glad if you find a better way! I just don't see it so far. I did implement a modification of the continuation that did this, but that was very involved and not worth it. The nice part about the separate function is that the roles are more well separated. |
Ah, now I see the problem. THere is a fundamental difference in doing this for recurrences and for featurizing. |
for recurrences you can just literally map the endpoints to the attractors in the new parameter. so you can just use this as mapping... |
@KalelR at the code you pasted above what is |
sorry, how? I don't get it. |
The vector of dictionaries returned by ´continuation |
can you do a video call today? I can show you what I mean |
@KalelR I've pushed the basin enclosure continuation in Do you mind branch off my branch now, to finish this, while I simplify all the "matching" new interface that I've created that is not really necessary? |
Ok! Are you in a hurry about finishing this part? |
it would be nice to have it by tuesday, I am presenting attractors.jl then. |
@KalelR it's okay; this doesn't block anything. The initial source code is there but it is not exported or discussed in any docs, so you can take your time. I can go ahead and finish and merge #132 without requiring the basin enclosure to be complete. We can also think of a better name than "basin enclosure". |
This is now implemented in #134 |
Idea
So far in the (global) continuation methods, the attractors are matched by some arbitrarily-defined distance function between them. This is quite nice, but isn't necessarily the best method in all scenarios. I've been working on some highly multistable systems in which the attractors can be quite close in state space and also feature space. Tracking the attractors properly with some distance function has proved very difficult.
Instead, also following literature on this, I decided it makes more sense to track the attractors differently. For an attractor A at parameter p1 and attractor B at p2>p1, I would like the algorithm to match A and B if a trajectory starting on the endpoint of A converges to B when p = p2. In this sense, to consider match attractors when the basin of B includes A, or at least part of A.
Implementation idea
I have implemented one way of doing this, but I'm pretty sure it is not the most efficient. The code is also not the very well written, but due to time constraints I cannot work on improving this now. In any case, because of PR #132 I will share my code here.
The basic idea is to use the following matching function:
which will match attractors if the endpoint of the previous attractor is the same as the starting point of the subsequent attractor. Then, we need to implement a function that will achieve this, by:
att_future_integrated
att_future_integrated
with the already found attractors in p2 (in the code, I called thematts_future
), using some distance function. If the attractor at p1 continues to exist at p2, thisatt_future_integrated
should be very similar (basically the same) as one of the already-found attractors at p2 - they should be the same attractor. So this distance should basically be zero. If the attractor at p1 ceases to exist, the trajectory will converge to another attractor. Then there are two possibilities. First, the attractor to which it converged exists at p1. So here two attractors at p1 converge to the same attractor at p2, I call them coflowing attractors. Second, the attractor to which it converged emerges at p2. Here, the attractor at p1 ceases to exist, and another attractor emerges at p2._find_coflowing
and_key_legitimate
.I'm sorry if this is too confusing! I myself was confused writing it, so I guess the explanation and code reflect that. I'll reiterate the basic idea, though: keep the continuation and matching function as they are. Only add a new function that essentially replaces the attractors with a trajectory that starts at the endpoint of the attractors at the previous parameter. Then, simply apply the matching function using
distance_matching_endpoint
.Code
The text was updated successfully, but these errors were encountered: