Skip to content
8 changes: 8 additions & 0 deletions khiva/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ def find_best_n_motifs(profile, index, m, n, self_join=False):
def stomp(first_time_series, second_time_series, subsequence_length):
""" Stomp algorithm to calculate the matrix profile between `ta` and `tb` using a subsequence length of `m`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this method filter trivial matches? if so, please add, "This method filters the trivial matches.", as the one below

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method doesn't filter trivial matches as it consider that both time series are different.


[1] Yan Zhu, Zachary Zimmerman, Nader Shakibay Senobari, Chin-Chia Michael Yeh, Gareth Funning, Abdullah Mueen,
Philip Brisk and Eamonn Keogh (2016). Matrix Profile II: Exploiting a Novel Algorithm and GPUs to break the one
Hundred Million Barrier for Time Series Motifs and Joins. IEEE ICDM 2016.

:param first_time_series: KHIVA array with the first time series.
:param second_time_series: KHIVA array with the second time series.
:param subsequence_length: Length of the subsequence.
Expand All @@ -99,6 +103,10 @@ def stomp_self_join(time_series, subsequence_length):
""" Stomp algorithm to calculate the matrix profile between `t` and itself using a subsequence length of `m`.
This method filters the trivial matches.

[1] Yan Zhu, Zachary Zimmerman, Nader Shakibay Senobari, Chin-Chia Michael Yeh, Gareth Funning, Abdullah Mueen,
Philip Brisk and Eamonn Keogh (2016). Matrix Profile II: Exploiting a Novel Algorithm and GPUs to break the one
Hundred Million Barrier for Time Series Motifs and Joins. IEEE ICDM 2016.

:param time_series: The query and reference time series in KHIVA array format.
:param subsequence_length: Lenght of the subsequence
:return: KHIVA arrays with the profile and index.
Expand Down