Compute the multi-dimensional non-normalized (i.e., without z-normalization) matrix profile This is a convenience wrapper around the Numba JIT-compiled parallelized `_maamp` function which computes the multi-dimensional matrix profile and multi-dimensional matrix profile index
(T, m, include=None, discords=False, p=2.0)
| 866 | |
| 867 | |
| 868 | def maamp(T, m, include=None, discords=False, p=2.0): |
| 869 | """ |
| 870 | Compute the multi-dimensional non-normalized (i.e., without z-normalization) matrix |
| 871 | profile |
| 872 | |
| 873 | This is a convenience wrapper around the Numba JIT-compiled parallelized |
| 874 | `_maamp` function which computes the multi-dimensional matrix profile and |
| 875 | multi-dimensional matrix profile index according to mSTOMP, a variant of |
| 876 | mSTAMP. Note that only self-joins are supported. |
| 877 | |
| 878 | Parameters |
| 879 | ---------- |
| 880 | T : numpy.ndarray |
| 881 | The time series or sequence for which to compute the multi-dimensional |
| 882 | matrix profile. Each row in `T` represents data from the same |
| 883 | dimension while each column in `T` represents data from a different |
| 884 | dimension. |
| 885 | |
| 886 | m : int |
| 887 | Window size |
| 888 | |
| 889 | include : list, numpy.ndarray, default None |
| 890 | A list of (zero-based) indices corresponding to the dimensions in `T` that |
| 891 | must be included in the constrained multidimensional motif search. |
| 892 | For more information, see Section IV D in: |
| 893 | |
| 894 | `DOI: 10.1109/ICDM.2017.66 \ |
| 895 | <https://www.cs.ucr.edu/~eamonn/Motif_Discovery_ICDM.pdf>`__ |
| 896 | |
| 897 | discords : bool, default False |
| 898 | When set to `True`, this reverses the distance matrix which results in a |
| 899 | multi-dimensional matrix profile that favors larger matrix profile values |
| 900 | (i.e., discords) rather than smaller values (i.e., motifs). Note that indices |
| 901 | in `include` are still maintained and respected. |
| 902 | |
| 903 | p : float, default 2.0 |
| 904 | The p-norm to apply for computing the Minkowski distance. Minkowski distance is |
| 905 | typically used with `p` being 1 or 2, which correspond to the Manhattan distance |
| 906 | and the Euclidean distance, respectively. |
| 907 | |
| 908 | Returns |
| 909 | ------- |
| 910 | P : numpy.ndarray |
| 911 | The multi-dimensional matrix profile. Each row of the array corresponds |
| 912 | to each matrix profile for a given dimension (i.e., the first row is |
| 913 | the 1-D matrix profile and the second row is the 2-D matrix profile). |
| 914 | |
| 915 | I : numpy.ndarray |
| 916 | The multi-dimensional matrix profile index where each row of the array |
| 917 | corresponds to each matrix profile index for a given dimension. |
| 918 | |
| 919 | Notes |
| 920 | ----- |
| 921 | `DOI: 10.1109/ICDM.2017.66 \ |
| 922 | <https://www.cs.ucr.edu/~eamonn/Motif_Discovery_ICDM.pdf>`__ |
| 923 | |
| 924 | See mSTAMP Algorithm |
| 925 | """ |