Last active
November 14, 2024 12:43
-
-
Save jaimeide/a9cba18192ee904307298bd110c28b14 to your computer and use it in GitHub Desktop.
Python implementation of the Detrended Partial Cross-Correlation Analysis (DPCCA) coefficient
In the original implementation, the authors use overlapping segment. I guess it depends on how many datapoints you have at disposal, using overlapping segment allows you to have more averaging and reduces the variance but can augment the bias due to the fact that the segments are not independant anymore.
hey @johncwok , shouldn't that be called on summulative sum instead?
k = 6
corr,parCorr,dcca, dpcca = compute_dpcca_others(xx,k)
EDIT: oh no sorry, you simply miss this line in the function:
xx = np.cumsum(cdata,axis=0)
Hi Oscar, John and dokato. Thanks for all the comments!
Apologies for the typo. In fact, I missed the line "xx = np.cumsum(cdata,axis=0)" in the final function.
I've now included it in the edited version.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I want to thank you for the code, it was very helpful for me. I have only one question.... I have read that the profiles should be divided in non-overlapping segments. However, the sliding_window function creates overlapping windows. Is it correct? Should I use overlapping or non-overlapping windows?
Best regards
Oscar