Compute the multi-dimensional non-normalized (i.e., without z-normalization) matrix profile with a `dask`/`ray` cluster This is a highly distributed implementation around the Numba JIT-compiled parallelized `_maamp` function which computes the multi-dimensional matrix profile a
(client, T, m, include=None, discords=False, p=2.0)
| 319 | |
| 320 | |
| 321 | def maamped(client, T, m, include=None, discords=False, p=2.0): |
| 322 | """ |
| 323 | Compute the multi-dimensional non-normalized (i.e., without z-normalization) matrix |
| 324 | profile with a `dask`/`ray` cluster |
| 325 | |
| 326 | This is a highly distributed implementation around the Numba JIT-compiled |
| 327 | parallelized `_maamp` function which computes the multi-dimensional matrix |
| 328 | profile according to STOMP. Note that only self-joins are supported. |
| 329 | |
| 330 | Parameters |
| 331 | ---------- |
| 332 | client : client |
| 333 | A `dask`/`ray` client. Setting up a cluster is beyond the scope of this |
| 334 | library. Please refer to the `dask`/`ray` documentation. |
| 335 | |
| 336 | T : numpy.ndarray |
| 337 | The time series or sequence for which to compute the multi-dimensional |
| 338 | matrix profile. Each row in `T` represents data from the same |
| 339 | dimension while each column in `T` represents data from a different |
| 340 | dimension. |
| 341 | |
| 342 | m : int |
| 343 | Window size |
| 344 | |
| 345 | include : list, numpy.ndarray, default None |
| 346 | A list of (zero-based) indices corresponding to the dimensions in `T` that |
| 347 | must be included in the constrained multidimensional motif search. |
| 348 | For more information, see Section IV D in: |
| 349 | |
| 350 | `DOI: 10.1109/ICDM.2017.66 \ |
| 351 | <https://www.cs.ucr.edu/~eamonn/Motif_Discovery_ICDM.pdf>`__ |
| 352 | |
| 353 | discords : bool, default False |
| 354 | When set to `True`, this reverses the distance matrix which results in a |
| 355 | multi-dimensional matrix profile that favors larger matrix profile values |
| 356 | (i.e., discords) rather than smaller values (i.e., motifs). Note that indices |
| 357 | in `include` are still maintained and respected. |
| 358 | |
| 359 | p : float, default 2.0 |
| 360 | The p-norm to apply for computing the Minkowski distance. Minkowski distance is |
| 361 | typically used with `p` being 1 or 2, which correspond to the Manhattan distance |
| 362 | and the Euclidean distance, respectively. |
| 363 | |
| 364 | Returns |
| 365 | ------- |
| 366 | P : numpy.ndarray |
| 367 | The multi-dimensional matrix profile. Each row of the array corresponds |
| 368 | to each matrix profile for a given dimension (i.e., the first row is |
| 369 | the 1-D matrix profile and the second row is the 2-D matrix profile). |
| 370 | |
| 371 | I : numpy.ndarray |
| 372 | The multi-dimensional matrix profile index where each row of the array |
| 373 | corresponds to each matrix profile index for a given dimension. |
| 374 | |
| 375 | Notes |
| 376 | ----- |
| 377 | `DOI: 10.1109/ICDM.2017.66 \ |
| 378 | <https://www.cs.ucr.edu/~eamonn/Motif_Discovery_ICDM.pdf>`__ |