Make excl_zone a parameter of stumpy.motif() #1063
Replies: 8 comments
-
@JulienLeprince Thank you for your question and welcome to the STUMPY community.
IIRC @NimaSarajpoor looked at this a long time ago (I don't recall the detail and I can't seem to find the original conversation) but I vaguely recall that excluding regions next to an already-discovered motif (candidate) subsequence would lead to unintended consequences. @NimaSarajpoor do you remember anything about this or was it related to something else? Note that an exclusion zone is already applied to neighboring areas surrounding subsequences that match a candidate motif subsequence. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the welcome and prompt reply Sean. To be clear:
|
Beta Was this translation helpful? Give feedback.
-
Yes, I understand. However, since the exclusion zone is also applied, say, upstream (and downstream), of a motif, it is also possible to miss desirable motifs as well. In other words, it's a double edged sword and we'd rather err on the side of NOT ignoring potential motifs since we (the developer) can't tell whether a subsequence is "important" or not. It also certainly depends on the size of your window, @JulienLeprince Often times, I like to ask whether you could do a bit of post-processing by setting I truly don't mean to be difficult here but |
Beta Was this translation helpful? Give feedback.
-
I think we had a relevant discussion but couldn't find it. I tried to check the code again, and noticed a few things that I shared below. Please let me know if you notice any mistake @JulienLeprince
Note 1: Note 2:
Note 3:
|
Beta Was this translation helpful? Give feedback.
-
@NimaSarajpoor Please correct me if I'm wrong but I don't think this is incorrect. From what I can see in the |
Beta Was this translation helpful? Give feedback.
-
Lines 140 to 143 in 3165d1c
A quick check
As a side, thanks for mentioning that matches (and their "close" neighbours) are prevented from becoming the next motif. In my previous comment, Note 1 (revised) |
Beta Was this translation helpful? Give feedback.
-
Ohhhhhhhh. Very sneaky. I totally forgot about that!! Nice catch. I almost feel like we SHOULD add a comment to remind future-self. In light of this, @JulienLeprince are you able to provide a concrete example (with data) of where the "other" motifs are "inside" of the exclusion zone of a previously identified motif? Note that the exclusion zone is within +/- |
Beta Was this translation helpful? Give feedback.
-
I've added a comment in the code: Lines 137 to 145 in 3676545 |
Beta Was this translation helpful? Give feedback.
-
Hi,
stumpy.motif() identifies a lot of overlapping motifs in my time series - would it possible to add excl_zone as a an input parameter to the function such that the unwanted behavior can be adjusted by users?
Kind regards,
Julien
Beta Was this translation helpful? Give feedback.
All reactions