A multi-dimensional wrapper around "Mueen's Algorithm for Similarity Search" (MASS) to compute multi-dimensional distance profile. Parameters ---------- Q : numpy.ndarray Query array or subsequence T : numpy.ndarray Time series array or sequence m : in
(
Q,
T,
m,
M_T,
Σ_T,
μ_Q,
σ_Q,
T_subseq_isconstant,
Q_subseq_isconstant,
query_idx=None,
)
| 14 | |
| 15 | |
| 16 | def _multi_mass( |
| 17 | Q, |
| 18 | T, |
| 19 | m, |
| 20 | M_T, |
| 21 | Σ_T, |
| 22 | μ_Q, |
| 23 | σ_Q, |
| 24 | T_subseq_isconstant, |
| 25 | Q_subseq_isconstant, |
| 26 | query_idx=None, |
| 27 | ): |
| 28 | """ |
| 29 | A multi-dimensional wrapper around "Mueen's Algorithm for Similarity Search" |
| 30 | (MASS) to compute multi-dimensional distance profile. |
| 31 | |
| 32 | Parameters |
| 33 | ---------- |
| 34 | Q : numpy.ndarray |
| 35 | Query array or subsequence |
| 36 | |
| 37 | T : numpy.ndarray |
| 38 | Time series array or sequence |
| 39 | |
| 40 | m : int |
| 41 | Window size |
| 42 | |
| 43 | M_T : numpy.ndarray |
| 44 | Sliding mean for `T` |
| 45 | |
| 46 | Σ_T : numpy.ndarray |
| 47 | Sliding standard deviation for `T` |
| 48 | |
| 49 | μ_Q : numpy.ndarray |
| 50 | Mean value of `Q` |
| 51 | |
| 52 | σ_Q : numpy.ndarray |
| 53 | Standard deviation of `Q` |
| 54 | |
| 55 | T_subseq_isconstant : numpy.ndarray |
| 56 | A boolean array that indicates whether a subsequence in `T` is constant (True) |
| 57 | |
| 58 | Q_subseq_isconstant : numpy.ndarray |
| 59 | A boolean array that indicates whether the subsequence in `Q` is constant (True) |
| 60 | |
| 61 | query_idx : int, default None |
| 62 | This is the index position along each of the time series in `T`, where |
| 63 | the query subsequence, `Q`, is located. `query_idx` should be set to None |
| 64 | if `Q` is not a subsequence of `T`. If `Q` is a subsequence of `T`, provding |
| 65 | this argument is optional. If query_idx is provided, the distance between Q |
| 66 | and `T[:, query_idx : query_idx + m]` will automatically be set to zero. |
| 67 | |
| 68 | Returns |
| 69 | ------- |
| 70 | D : numpy.ndarray |
| 71 | Multi-dimensional distance profile |
| 72 | """ |
| 73 | d, n = T.shape |
no outgoing calls