Top K motifs of Time Series #770
Replies: 6 comments 6 replies
-
@meeen Thank you for your question and welcome to the STUMPY community. Unfortunately, I don't think what you are doing is correct. It looks like you are re-computing the same matrix profile 15 times and then grabbing the same top-1 motif every time. Instead, you should compute the matrix profile once and then extract the top 15 motifs once:
Please refer to the stumpy.motifs documentation for an explanation and please feel free to ask follow up questions if the documentation is unclear. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your help If I use the code you showed above, I get basicly just the same form(graph) over and over again. One motif and than 24 matches of the same motif all looking almost identical. If I increase max_matches I get even more of the same form. So this seams to the most common motif in my time series, because it has al lot of matches? If I change max_motif nothing changes. How do I get the next most common form(motif?) in my time series? So that I have the top 10 motifs that look diffrent, with each having their matches. What I want to implement is what is discribed on the stumpy website: Find Top-K Motifs My idea was, to get the most common motif with stumpy.motifs and and than delete this motif and all its matches with How far am I off? |
Beta Was this translation helpful? Give feedback.
-
In theory, Each row of your As stated in the
So, you may try increasing "setting min_neighbors=1, max_distance=np.inf, and cutoff=np.inf will ensure that the shape of the output arrays will be (max_motifs, max_matches)":
This should,, hopefully, get you pretty close to what you need. However, note that the quality of the matches are likely to diminish as you move towards the right (columns) of I hope that helps. |
Beta Was this translation helpful? Give feedback.
-
Thank you, this was my problem. I tweaked the parameters and now I get really good results :) I use this for my my bachelor thesis where I have to search for pattern and anomalies in sensor data. I found the pattern and anomalies of given length based on domain knowledge. I read the matrix profile XX paper about pan matrix profile and I tried the example. My pan matrix profile looks like this: Also my discords that I found where just the most noisy part of my Timeseries, is there something I can do to tweak this to get more domain relevant discords? But in terms of finding pattern matrix profile with stumpy is the best method by far tested on my data. Do you have any suggestions what could be an interesting idea to try? Thank you for your help :) |
Beta Was this translation helpful? Give feedback.
-
Given the change in topic, would you mind creating a separate/new discussion on using
Unfortunately, this is domain dependent and so you'll have to traverse the set of discords and see if they make any sense.
You may try looking at the following papers that were published by the original authors: https://www.cs.ucr.edu/~eamonn/100_Time_Series_Data_Mining_Questions__with_Answers.pdf There are some wonderful ideas there. |
Beta Was this translation helpful? Give feedback.
-
Good afternoon. I'm a bit confused about how the stumpy.motifs function can return the top k motifs when we provide the matrix profile computed by stumpy.stump(time_serie_array, m=m, k=1) as input. Does this mean that it selects the top motifs based on the distance of the first match to the motif sequence? If we instead wanted the top motifs where the average distance of the first 5 matches is minimized, would we need to use the matrix profile generated using stumpy.stump(time_serie_array, m=m, k=5) instead? Thank you for your assistance. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
based on this paper ( https://www.cs.ucr.edu/~eamonn/meaningless.pdf ) I want to find the top K motifs of my Time Series and than Cluster them.
I have a univariate time series with floats as values.
I use this code to get the top k motifs:
s = amount of steps
k = amount of motif I want to find
top_motifs = list with index of top motifs
m_seg = list of array with the values of the top motifs
Am I getting the too k motifs with this Code?
Is there already a better implementation to get the tok k motifs?
Thank you for your help :)
Beta Was this translation helpful? Give feedback.
All reactions