Skip to content
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

About Nonlinear Warping #20

Open
Wasabi111 opened this issue Feb 9, 2022 · 2 comments
Open

About Nonlinear Warping #20

Wasabi111 opened this issue Feb 9, 2022 · 2 comments

Comments

@Wasabi111
Copy link

Hi Alex,

I have a question about nonlinear warping you mentioned in Discovering Precise Temporal Patterns in Large-Scale Neural Recordings through Robust and Interpretable Time Warping, 2020.
1644371464(1)

Fig.1C shows that for all trials the template time and clock time have little difference at the begining and ending. However when applying this technique to High-performance brain-to-text communication via handwriting, 2021, the warp function looks different. This paper use your time warp technique to warp all the single letter motor imaginary neuron activity data to an average template.
image

Take 'L' for example. the warping function shows that the clock time and aligned time have little difference at the beginning and big difference in the end. I am confused by this phenomenon since after alignment, raw data would nonlinearly map to the template and the start time should change as the same level as end time. Could you please help me with this confusion? Thanks!

Best regards,
Dongming

@ahwillia
Copy link
Owner

ahwillia commented Feb 9, 2022

Fig.1C shows that for all trials the template time and clock time have little difference at the begining and ending.

I'm not exactly sure that the figure shows that. There is a big spread in the top two plots (shift-only and linear time warping) around t=0 and t=1. The DTW barycenter averaging (bottom plot) is a different method which constrains there to be no spread in the warping functions and t=0 and t=1.

when applying this technique to High-performance brain-to-text communication via handwriting, 2021, the warp function looks different

They used an older version of the time warping code -- available here: https://github.com/ganguli-lab/twpca -- the essential ideas behind the model are the same, but the nonlinear warping functions are fit via gradient descent. That version of the code also let you add constraints (e.g. all warping functions must go through the origin -- which it seems may be an added constraint in this plot).

@Wasabi111
Copy link
Author

Hi Alex,

Thank you very much for your detailed instructions.

That version of the code also let you add constraints (e.g. all warping functions must go through the origin -- which it seems may be an added constraint in this plot).
1644479531(1)

Since I could reproduce the plot, I checked the constraints and found the origin index set to None. From my perspection, I thought this mean no constraints of pinned start added. However, when I changed the origin index from None to 0, the plot remains the same. I wonder if a start point must set and if origin index is none, it would be default set to 0. Thanks!

Best regards,
Dongming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants