A Numba JIT-compiled version of AAMP for parallel computation of the matrix profile and matrix profile indices. Parameters ---------- T_A : numpy.ndarray The time series or sequence for which to compute the matrix profile T_B : numpy.ndarray The time series
(
T_A,
T_B,
m,
T_A_subseq_isfinite,
T_B_subseq_isfinite,
p,
diags,
ignore_trivial,
k,
)
| 189 | fastmath=config.STUMPY_FASTMATH_FLAGS, |
| 190 | ) |
| 191 | def _aamp( |
| 192 | T_A, |
| 193 | T_B, |
| 194 | m, |
| 195 | T_A_subseq_isfinite, |
| 196 | T_B_subseq_isfinite, |
| 197 | p, |
| 198 | diags, |
| 199 | ignore_trivial, |
| 200 | k, |
| 201 | ): |
| 202 | """ |
| 203 | A Numba JIT-compiled version of AAMP for parallel computation of the matrix |
| 204 | profile and matrix profile indices. |
| 205 | |
| 206 | Parameters |
| 207 | ---------- |
| 208 | T_A : numpy.ndarray |
| 209 | The time series or sequence for which to compute the matrix profile |
| 210 | |
| 211 | T_B : numpy.ndarray |
| 212 | The time series or sequence that will be used to annotate T_A. For every |
| 213 | subsequence in T_A, its nearest neighbor in T_B will be recorded. |
| 214 | |
| 215 | m : int |
| 216 | Window size |
| 217 | |
| 218 | T_A_subseq_isfinite : numpy.ndarray |
| 219 | A boolean array that indicates whether a subsequence in `T_A` contains a |
| 220 | `np.nan`/`np.inf` value (False) |
| 221 | |
| 222 | T_B_subseq_isfinite : numpy.ndarray |
| 223 | A boolean array that indicates whether a subsequence in `T_B` contains a |
| 224 | `np.nan`/`np.inf` value (False) |
| 225 | |
| 226 | p : float |
| 227 | The p-norm to apply for computing the Minkowski distance. Minkowski distance is |
| 228 | typically used with `p` being 1 or 2, which correspond to the Manhattan distance |
| 229 | and the Euclidean distance, respectively. |
| 230 | |
| 231 | diags : numpy.ndarray |
| 232 | The diag of diagonals to process and compute |
| 233 | |
| 234 | ignore_trivial : bool |
| 235 | Set to `True` if this is a self-join. Otherwise, for AB-join, set this to |
| 236 | `False`. Default is `True`. |
| 237 | |
| 238 | k : int |
| 239 | The number of top `k` smallest distances used to construct the matrix profile. |
| 240 | Note that this will increase the total computational time and memory usage |
| 241 | when k > 1. |
| 242 | |
| 243 | Returns |
| 244 | ------- |
| 245 | out1 : numpy.ndarray |
| 246 | The (top-k) matrix profile |
| 247 | |
| 248 | out2 : numpy.ndarray |
no test coverage detected