Discover the top non-normalized motifs (i.e., without z-normalization) for the multi-dimensional time series `T` Parameters ---------- T : numpy.ndarray The multi-dimensional time series or sequence P : numpy.ndarray Multi-dimensional Matrix Profile of T
(
T,
P,
I,
min_neighbors=1,
max_distance=None,
cutoffs=None,
max_matches=10,
max_motifs=1,
atol=1e-8,
k=None,
include=None,
p=2.0,
)
| 12 | |
| 13 | |
| 14 | def aamp_mmotifs( |
| 15 | T, |
| 16 | P, |
| 17 | I, |
| 18 | min_neighbors=1, |
| 19 | max_distance=None, |
| 20 | cutoffs=None, |
| 21 | max_matches=10, |
| 22 | max_motifs=1, |
| 23 | atol=1e-8, |
| 24 | k=None, |
| 25 | include=None, |
| 26 | p=2.0, |
| 27 | ): |
| 28 | """ |
| 29 | Discover the top non-normalized motifs (i.e., without z-normalization) for the |
| 30 | multi-dimensional time series `T` |
| 31 | |
| 32 | Parameters |
| 33 | ---------- |
| 34 | T : numpy.ndarray |
| 35 | The multi-dimensional time series or sequence |
| 36 | |
| 37 | P : numpy.ndarray |
| 38 | Multi-dimensional Matrix Profile of T |
| 39 | |
| 40 | I : numpy.ndarray |
| 41 | Multi-dimensional Matrix Profile indices |
| 42 | |
| 43 | min_neighbors : int, default 1 |
| 44 | The minimum number of similar matches a subsequence needs to have in order |
| 45 | to be considered a motif. This defaults to `1`, which means that a subsequence |
| 46 | must have at least one similar match in order to be considered a motif. |
| 47 | |
| 48 | max_distance : flaot, default None |
| 49 | Maximal distance that is allowed between a query subsequence |
| 50 | (a candidate motif) and all subsequences in T to be considered as a match. |
| 51 | If None, this defaults to |
| 52 | `np.nanmax([np.nanmean(D) - 2 * np.nanstd(D), np.nanmin(D)])` |
| 53 | (i.e. at least the closest match will be returned). |
| 54 | |
| 55 | cutoffs : numpy.ndarray or float, default None |
| 56 | The largest matrix profile value (distance) for each dimension of the |
| 57 | multidimensional matrix profile that a multidimenisonal candidate motif is |
| 58 | allowed to have. If `cutoffs` is a scalar value, then this value will be |
| 59 | applied to every dimension. |
| 60 | |
| 61 | max_matches : int, default 10 |
| 62 | The maximum number of similar matches (nearest neighbors) to return for each |
| 63 | motif. The first match is always the self/trivial-match for each motif. |
| 64 | |
| 65 | max_motifs : int, default 1 |
| 66 | The maximum number of motifs to return |
| 67 | |
| 68 | atol : float, default 1e-8 |
| 69 | The absolute tolerance parameter. This value will be added to `max_distance` |
| 70 | when comparing distances between subsequences. |
| 71 |