-
Notifications
You must be signed in to change notification settings - Fork 12
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
trend analysis - computation of δ (balanced distance of diagonal) #167
Comments
@felixcremer do you have any idea? @schlichtanders sorry, its been so long since I've done any meaningful science with RQA that I don't have the expertise to answer right away, I would need more background information. |
Oh perhaps @pucicu has an idea as well? |
I followed the literatur, and this is a standard computation of the slope of a linear regression. This indeed requires the correct mean See for instance https://en.wikipedia.org/wiki/Ordinary_least_squares#Simple_linear_regression_model |
The current implementation is based on the formula given here: http://www.recurrence-plot.tk/rqa.php But it's true that that formula considers no Theiler window, (i.e. δ = d - (a+b)/2 but δ = d - (b+theiler)/2 ( |
simply do not use the trend measure. it does not make much sense.
there was never a mathematical definition given by the inventors of this measure. at http://www.recurrence-plot.tk/rqa.php tried to formulate one, which seems to fit the original idea quite well.
… Am 09.01.2025 um 11:13 schrieb Stephan Sahm ***@***.***>:
in https://github.com/JuliaDynamics/RecurrenceAnalysis.jl/blob/48df04ba38c6a14fc7153cd5dfac1fbb9d3a8eb8/src/rqa/rqa.jl#L285
δ seems to be defined by comparing the current dimension with the "mean dimension", analogous to how the tau_recurrence value of the current dimension is compared to the mean recurrence value in
https://github.com/JuliaDynamics/RecurrenceAnalysis.jl/blob/48df04ba38c6a14fc7153cd5dfac1fbb9d3a8eb8/src/rqa/rqa.jl#L286
However the mean is taken from a:b only
https://github.com/JuliaDynamics/RecurrenceAnalysis.jl/blob/48df04ba38c6a14fc7153cd5dfac1fbb9d3a8eb8/src/rqa/rqa.jl#L283
so shouldn't it be
δ = d - (b-a)/2
?
—
Reply to this email directly, view it on GitHub <#167>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAHNNEDPYFV7E6AMYY6EMN32JZDVRAVCNFSM6AAAAABU3ZPQZCVHI2DSMVQWIX3LMV43ASLTON2WKOZSG43TOMZZG4ZDAOI>.
You are receiving this because you are subscribed to this thread.
|
Here https://www.nsf.gov/pubs/2005/nsf05057/nmbs/nmbs.pdf (search for TREND) the trend is defined as the slope of a linear regression between diagonal offset and percentage of local recurrence, which I find quite intuitive as a measure. |
indeed, including the theiler window would make some sense. but there is not any study, as far as i know, which has used it in this way.
… Am 09.01.2025 um 15:04 schrieb Helios De Rosario ***@***.***>:
The current implementation is based on the formula given here: http://www.recurrence-plot.tk/rqa.php
But it's true that that formula considers no Theiler window, (i.e. a=1), so it might be necessary to adapt it. However, even in that case it shouldn't be
δ = d - (a+b)/2
but
δ = d - (b+theiler)/2
(a and theiler differ by 1)
—
Reply to this email directly, view it on GitHub <#167 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAHNNEB6IAHAZU3YCTANFPL2JZ6WJAVCNFSM6AAAAABU3ZPQZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBQGI4DENZRHA>.
You are receiving this because you were mentioned.
|
the problem with this measure is that it depends strongly on the size of the RP (or the used windows), on the initial conditions, and it does not have a clear physical meaning.
regarding the windowing, see here: https://www.worldscientific.com/doi/abs/10.1142/S0218127411029008
it uses the tau-RR (although not stated in the original paper or the mentioned tutorial). tau-RR has a nice meaning, but used for different purposes.
if you are interested in a qualitative measure for homogeneity of RPs, you can consider lacunarity: https://doi.org/10.1007/s11071-021-06457-5
if you need a pdf of the papers, send me an email.
… Am 10.01.2025 um 10:08 schrieb Stephan Sahm ***@***.***>:
Here https://www.nsf.gov/pubs/2005/nsf05057/nmbs/nmbs.pdf (search for TREND) the trend is defined as the slope of a linear regression between diagonal offset and percentage of local recurrence, which I find quite intuitive as a measure.
—
Reply to this email directly, view it on GitHub <#167 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAHNNECZR2CCX4SXWFTEU7D2J6EZFAVCNFSM6AAAAABU3ZPQZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBSGEZDENRTGU>.
You are receiving this because you were mentioned.
|
Right, so what's the status now with this issue? Is there a change that should be done, or should it be closed? |
I would fix trend as I suggested above δ = d - (b+theiler)/2 So that it is balanced with theiler windows, keeping the same result as the formula published in recurrence-plot.tk when |
thanks! but please include a clear documentation on this.
… Am 11.01.2025 um 06:18 schrieb Helios De Rosario ***@***.***>:
I would fix trend as I suggested above
δ = d - (b+theiler)/2
So that it at least gives the same result as the formula published in recurrence-plot.tk when theiler==0, as assumed there.
I'm doing the corresponding PR.
—
Reply to this email directly, view it on GitHub <#167 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAHNNEBKXTMM4RGRCBVTCL32KCSTPAVCNFSM6AAAAABU3ZPQZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBVGA3TMNJRGI>.
You are receiving this because you were mentioned.
|
* Fix computation of trend according to #167 * fix test result of trend * fix test results of trend * Update CHANGELOG.md * Update docstring of `trend` * Update CHANGELOG.md --------- Co-authored-by: George Datseris <datseris.george@gmail.com>
in
RecurrenceAnalysis.jl/src/rqa/rqa.jl
Line 285 in 48df04b
δ seems to be defined by comparing the current dimension with the "mean dimension", analogous to how the tau_recurrence value of the current dimension is compared to the mean recurrence value in
RecurrenceAnalysis.jl/src/rqa/rqa.jl
Line 286 in 48df04b
However the mean is taken from
a:b
onlyRecurrenceAnalysis.jl/src/rqa/rqa.jl
Line 283 in 48df04b
so shouldn't it be
?
The text was updated successfully, but these errors were encountered: