Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Finding a motif across multiple timeseries, which should not be part of a third timeseries #937

Unanswered
Discussion options

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!

You must be logged in to vote

Replies: 1 comment

Comment options

@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.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /