JuliaDynamics/RecurrenceAnalysis.jl

Extracting pieces of a AbstractRecurrenceMatrix

Open

#118 opened on Feb 11, 2021

 (9 comments) (0 reactions) (0 assignees)Julia (16 forks)auto 404
good first issue

Repository metrics

Stars
 (50 stars)
PR merge metrics
 (PR metrics pending)

Description

Hello there. I am working in a new way to calculate some RQA quantifiers and, for this purpose, I need to extract some smaller sets of the Recurrence Matrix (RM). I have implemented this in my own code, however I would like to integrate it with DynamicalSystems to use its high speed. In my code, I have defined a RecurrencePlot (RP) as a Array{Bool, 2} and, hence, extracting a smaller block reduces to RP[1:3, 1:3] (for example). Thus, I was expecting that something like RM = RecurrenceMatrix(mapp, e) micro = RM[1:3, 1:3] would return micro as the same type of RM. However, when I do this, I get: typeof(micro) >> SparseArrays.SparseMatrixCSC{Bool,Int64} And this does not allow me to use determinism(micro), for the RQA quantifiers only accept ::AbstractRecurrenceMatrix. Hence, I looked for the documentation of ::AbstractRecurrenceMatrix to see whether I could somehow get my micro to be the same type as RM, but this search was unsuccessful. Is there a way to do this or could this feature somehow be implemented?

It has occured to me that I could get the variable micro the way I want if I do the following: micro = CrossRecurrenceMatrix(mapp[1:3], mapp[1:3], e) However this implies that the whole calculation of the matrix will be made every single time and I was looking for a simpler way to do this, such as the one I mentioned or, at least, not as expensive computationally. I also realize the @windowed macro does something of the fashion, but not quite what I need.

Contributor guide