Closed Datseris closed 6 years ago
Just saw you also have Cao's method , which we also have implemented in ChaosTools.
In the coming week I will be comparing your methods in detail, because in my eyes there should be one "best" implementation that everyone uses.
Hi, I need some time to explore the packages in JuliaDynamics, which I didn't know, but I'd be happy to join the organization, and modify RecurrenceAnalysis.jl, collaborating with DynamicalSystems.jl and ChaosTools.jl to have an unified way of working with embedded time series.
Please let me know how to proceed.
Awesome! At the moment I am in the process of creating a Jupyter notebook that compares the fully implemented and fully shared features that we both have, like e.g. delay embedding, entropy, mutual info., etc.
When I am done I will post it here. I will also post my opinion of what is the best way forward. In my eyes at least, the definitive step forward is to choose the best implementations out of the shared features we have and make sure we both use the best ones ! :)
Other than that there is not a lot of work to be done on the source code: just ensure interop with DynamicalSystems.jl. There is however (in my humble opinion) a bit more work that needs to be done in (a) documentation and (b) tests. I think both should be expanded, but I will write in detail later once I am finished with the comparison!
I have started looking at DynamicalSystemsBase.reconstruct
vs. RecurrenceAnalysis.embed
. reconstruct
is indeed more flexible and powerful, the only advantage of embed
being that it is lighter.
However, for RQA, in particular to create the recurrence matrix, RecurrenceAnalysis resorts to the pairwise
function of the package Distances.jl. That function is very efficient, but it works with matrices (the output of embed
), not with Dataset
objects (output of reconstruct
).
The simplest solution I can think of is to use create a matrix out of the dataset to pass it to my current functions. E.g. if the dataset is in the variable dat
:
rmat = recurrencematrix(Matrix(dat), radius)
This looks pretty cheap and fast, but of course is just a detour with respect to using RecurrenceAnalysis.embed
.
The alternative would be not using Distances.pairwise
, but another tool to create the distances/recurrence matrices. However I'm not aware of a more efficient way to do it.
What do you think?
I am in the middle of making the notebook, please be a bit more patient :) I'll let you know in detail at most in a couple of days. There are more things to consider besides pairwise
. if you would like to help me out, you can have a look at the performance and robustness of our mutual information method and compare it with yours. I will compare the entropies and the embedding dimension estimation and I will also try to figure out which parts of the source code need to be changed.
For example I saw that you identify the "distance" functions by strings. This is very unstable and not good practice. One should identify them by type, which also requires the same amount of characters. e.g. Euclidean()
instead of "euclidean"
.
I quickly want to point out that the performance of reconstruct
is actually now 20 times faster at current master. While benchmarking I noticed a big regression that I fixed easily.
Hey @heliosdrm , I had a lot of free time during my train ride and I finished the comparison.
EDIT: I did not do the Mutual Information... I am counting on you for that :) Althought to be honest I am almost certain your method will be better than the one in ChaosTools
here are the results: https://gist.github.com/Datseris/3ca61b32dea2033aeae5c4dfe3e0b78c
I am moving this to #9
JuliaDynamics
Hi!
I was not aware of this package, and I can see that it is very interesting and helpful! In addition I can also see that there is a significant overlap with DynamicalSystems.jl and what you are trying to do here!
This is an invitation to join the JuliaDynamics organization, which I believe this package is a perfect fit. Unfortunately joining the organization means that you would have to share owner privilliges with user @Datseris, but I can assure you that this is nothing to worry about.
Joining DynamicalSystems.jl
This is also a second invitation to join DynamicalSystems.jl. The way DynamicalSystems.jl works is that it re-exports existing packages (currently
DynamicalSystemsBase, ChaosTools
and in the near futureGAIO
) and host a unified documentation for them.I have seen a significant amount of overlap already with what you have here. For example we also have:
Should you wish to join DynamicalSystems.jl there are some effort that needs to be put into this (from both parties). We need to eradicate the duplicated functionality, e.g. 1 embedding method should be used, which ever is best. The same goes for all other overlapping. In addition, documentation strings should be enriched with descriptions and citations of what is going on.
Why?
DynamicalSystems.jl is an award-winning software. Besides this, it aims to be a trusty companion to both students and scientists working on nonlinear dynamics and chaos.
DynamicalSystems.jl will benefit significantly from having your package there, because I believe it is not only a job well done, but also very useful!
RecurrenceAnalysis.jl will also benefit from joining DynamicalSystems.jl / JuliaDynamics : it will get much more exposure and more testing. This will help the package mature into something robust and trustworthy.
In addition, for users, it is much more helpful to have things in a unified and "respected" (i.e. with real people and real packages) organization (in this case JuliaDynamics) that has active members and inspires trust for the users. It also helps finding packages. For example even though I am very active in nonlinear dynamics in Julia, I had no idea about your package until today.