Question - Plans to implement algorithm to search for consensus motifs #276
Replies: 8 comments
-
@DanBenHa Thank you for your question and welcome to the STUMPY community! In short, we do not currently have any implementation for finding time series consensus motifs but I have added this feature request as I think it is certainly worth having. Perhaps, this is something that we can work together on and that you might consider contributing to STUMPY (I can definitely assist you where you may need help)?
Yes, this definitely makes sense. If I could make a suggestion, maybe you can:
Since you aren't certain that a motif will necessarily reside in ALL time series then the above may be a "better" approach but you'll need to test and learn. A note about appending Let me know if you have any questions or comments and I'd be happy to clarify! |
Beta Was this translation helpful? Give feedback.
-
Okay, I see that I've basically restated some of their "brute force" approach in their paper (not exactly) and they have proposed something called "ostinato". My guess is that it shouldn't be too difficult to implement Table 2 in their paper. |
Beta Was this translation helpful? Give feedback.
-
From the However, according to their Matlab code, it appears that this is equivalent to performing an
|
Beta Was this translation helpful? Give feedback.
-
@seanlaw Thanks a lot for your replies and the warm welcome! What you suggest sounds reasonable. I'm also reading #149 to get inspired - a different domain but probably similar goals. Will let you know if I have new ideas/questions. I'd certainly be interested in contributing code. At first glance the Ostinato algorithm doesn't look that complicated but I'll have a closer look (that is, if you're not already working on an implementation yourself). |
Beta Was this translation helpful? Give feedback.
-
Great and good luck!
Sounds good and, no, I haven't worked on it yet. Let's track it in issue #277. Usually, we recommend contributing a code-only Jupyter notebook first that reproduces one of the primary figures from the paper that you pointed to (no need for text annotations). This way, we can start with a rough prototype with the Ostinato code and build enough confidence that the code reproduces the paper. Let me know how that sounds. |
Beta Was this translation helpful? Give feedback.
-
Sounds good. I'll get started on a notebook and continue the feature-related discussion in #277. Where would I best put the notebook? In my forked repo or somewhere else? |
Beta Was this translation helpful? Give feedback.
-
Good questions! Okay, I think we should be a little more pragmatic and scope it so that it is slightly more manageable. I'd like to separate the "notebook reproducer" (now tracked in #278) from the feature enhancement (#277). First, let's get the "notebook reproducer" completed and iron out all of the kinks and, once that is complete, the feature enhancement should be straightforward (i.e., we'll extract the Please take a look at #278 as I've outlined what is roughly needed for a notebook reproducer. Let me know if you have any questions, comments, or concerns. |
Beta Was this translation helpful? Give feedback.
-
Closed in #279 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm a PhD candidate in Neuroscience and would like to use this toolbox on behavioural data.
I have velocity time-series of several hundred trials in which a subject moves to one of two targets, dependent on varying cues presented throughout the trial. My goal is to find repeated motifs (not necessarily present in all trials) and see if these motifs correlate with simultaneously recorded brain activity patterns.
One idea was to find consensus motifs like in this paper. As far as I can see there is yet no way to find consensus motifs using stumpy. Do you plan on adding something like that?
I'm not sure if the search for a consensus motif across trials would be the best approach for my data, as I don't expect to find a common motif in every single trial. What I need is some kind of ranking for motifs from most common to less common. I guess I would obtain that by computing the matrix profile and iteratively "ascending" the distances (leaving out the trivial matches close to the local minima). Does that make sense?
Many thanks for this great toolbox, I think it will be really useful for my research!
Beta Was this translation helpful? Give feedback.
All reactions