-
Notifications
You must be signed in to change notification settings - Fork 337
Finding a motif across multiple timeseries, which should not be part of a third timeseries #937
-
I'm currently using stumpy.ostinato for finding motifs which stay (more or less) constant across multiple time series. Now, however, I have the second requirement that my found motif should not be found in a third time series. This with the purpose to identify motif-based differences between different sets of time series.
I.e. I'm now looking for an implementation approach to find a motif with the smallest matrix distance in time series A and B, but simultaneously the largest matrix distance to a similar pattern in time series C. Is there a function available for such an operation, or are there other ideas about how to solve this problem?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
@anates Thank you for your question and welcome to the STUMPY community!
Off the top of my head, I cannot think of any good solution. I wonder if you can apply stumpy.ostinato on A and B in order to identify the consensus motif, CM, and then compute the distance profile between CM and time series C using the mass function:
distance_profile = stumpy.mass(CM, C)
min_dist = np.nanmin(distnace_profile)
If min_dist is small then the consensus motif is also found in C. If that is the case then you may need to set the subsequences in A, B, and C that are the same/similar to CM to np.nan values, which eliminates that subsequence completely from consideration and then repeat the above process again until the min_dist is satisfactorily "large". Something tells me that there is a better/more efficient way to do this.
Beta Was this translation helpful? Give feedback.