Compute an incremental non-normalized (i.e., without z-normalization) matrix profile for streaming data Parameters ---------- T : numpy.ndarray The time series or sequence for which the non-normalized matrix profile and matrix profile indices will be returned
| 9 | |
| 10 | |
| 11 | class aampi: |
| 12 | # needs to be enhanced to support top-k matrix profile |
| 13 | """ |
| 14 | Compute an incremental non-normalized (i.e., without z-normalization) matrix profile |
| 15 | for streaming data |
| 16 | |
| 17 | Parameters |
| 18 | ---------- |
| 19 | T : numpy.ndarray |
| 20 | The time series or sequence for which the non-normalized matrix profile and |
| 21 | matrix profile indices will be returned |
| 22 | |
| 23 | m : int |
| 24 | Window size |
| 25 | |
| 26 | egress : bool, default True |
| 27 | If set to `True`, the oldest data point in the time series is removed and |
| 28 | the time series length remains constant rather than forever increasing |
| 29 | |
| 30 | p : float, default 2.0 |
| 31 | The p-norm to apply for computing the Minkowski distance. |
| 32 | |
| 33 | k : int, default 1 |
| 34 | The number of top `k` smallest distances used to construct the matrix profile. |
| 35 | Note that this will increase the total computational time and memory usage |
| 36 | when k > 1. |
| 37 | |
| 38 | mp : numpy.ndarray, default None |
| 39 | A pre-computed matrix profile (and corresponding matrix profile indices). |
| 40 | This is a 2D array of shape `(len(T) - m + 1, 2 * k + 2)`, where the first `k` |
| 41 | columns are top-k matrix profile, and the next `k` columns are their |
| 42 | corresponding indices. The last two columns correspond to the top-1 left and |
| 43 | top-1 right matrix profile indices. When None (default), this array is computed |
| 44 | internally using `stumpy.aamp`. |
| 45 | |
| 46 | Attributes |
| 47 | ---------- |
| 48 | P_ : numpy.ndarray |
| 49 | The updated matrix profile for `T` |
| 50 | |
| 51 | I_ : numpy.ndarray |
| 52 | The updated matrix profile indices for `T` |
| 53 | |
| 54 | left_P_ : numpy.ndarray |
| 55 | The updated left matrix profile for `T` |
| 56 | |
| 57 | left_I_ : numpy.ndarray |
| 58 | The updated left matrix profile indices for `T` |
| 59 | |
| 60 | T_ : numpy.ndarray |
| 61 | The updated time series or sequence for which the matrix profile and matrix |
| 62 | profile indices are computed |
| 63 | |
| 64 | Methods |
| 65 | ------- |
| 66 | update(t) |
| 67 | Append a single new data point, `t`, to the time series, `T`, and update the |
| 68 | matrix profile |
no outgoing calls