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

Matchplot extension #52

Merged
merged 10 commits into from
Apr 6, 2023

Conversation

SynapticSage
Copy link
Contributor

@SynapticSage SynapticSage commented Jan 31, 2023

Matchplot for 2D timeseries.

Made a matchplot variant to check dtw of 2D animal paths (x,y,t) onto templated "ideal" paths. Plots (x,y) of each curve in the pair and lines to corresponding times.

Call the recipe like the 1D matchplot

matchplot2(Q, Y, ds=5)

Circles example
circle

Path example
paths

2d/3d extension of the existing 1d matchplot recipe. Example usage: I have x/y-position behavior data where I register similar animal trajectory times based on stereotyped paths animals take between two points in a maze. I found this helpful in visualizing time-warp-matched points of 2d vector signals. Maybe someone else finds this useful for a different 2d/3d vector function of time.
Removed an @infiltrate statement left in erroneously.
@codecov
Copy link

codecov bot commented Feb 1, 2023

Codecov Report

Base: 90.88% // Head: 91.00% // Increases project coverage by +0.11% 🎉

Coverage data is based on head (35a79e8) compared to base (1aef501).
Patch coverage: 95.65% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #52      +/-   ##
==========================================
+ Coverage   90.88%   91.00%   +0.11%     
==========================================
  Files          14       14              
  Lines         911      934      +23     
==========================================
+ Hits          828      850      +22     
- Misses         83       84       +1     
Flag Coverage Δ
unittests 91.00% <95.65%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/plots.jl 70.99% <95.65%> (+5.25%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@baggepinnen
Copy link
Owner

Hello and thanks for this cool PR :)
Would you mind calling the plotting function from the tests as well? Testing plots is difficult, but we can at least test that the plot function does not throw an error. You could add a line similar to this one that tests the standard matchplot https://github.com/baggepinnen/DynamicAxisWarping.jl/blob/master/test/runtests.jl#L153

It would also be good to mention the new function in the documentation in the readme.

@SynapticSage
Copy link
Contributor Author

SynapticSage commented Feb 2, 2023

Sounds good. I'll push these changes soon when I catch some free time later this week.

@SynapticSage
Copy link
Contributor Author

Threw a short section into the Readme.md, a function header doc, and a few tests around the line you recommended.

Also added two keyword args to the plot. It's nice to be able to have the index plotted onto a 3rd axis or toggle normalization off sometimes. So options to toggle those.

@SynapticSage
Copy link
Contributor Author

Anything that would be helpful to finish off this PR?

@baggepinnen baggepinnen merged commit ea6b9b2 into baggepinnen:master Apr 6, 2023
@baggepinnen
Copy link
Owner

Thanks for your patience :) it had just fallen off my radar

@SynapticSage
Copy link
Contributor Author

No worries! Also fell off mine.

Take care :)

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

Successfully merging this pull request may close these issues.

2 participants