MCPcopy
hub / github.com/stumpy-dev/stumpy / scraamp

Class scraamp

stumpy/scraamp.py:479–871  ·  view source on GitHub ↗

Compute an approximate non-normalized (i.e., without z-normalization) matrix profile This is a convenience wrapper around the Numba JIT-compiled parallelized `_aamp` function which computes the non-normalized (i.e., without z-normalization) matrix profile according to SCRIMP.

Source from the content-addressed store, hash-verified

477
478
479class scraamp:
480 """
481 Compute an approximate non-normalized (i.e., without z-normalization) matrix profile
482
483 This is a convenience wrapper around the Numba JIT-compiled parallelized
484 `_aamp` function which computes the non-normalized (i.e., without z-normalization)
485 matrix profile according to SCRIMP.
486
487 Parameters
488 ----------
489 T_A : numpy.ndarray
490 The time series or sequence for which to compute the matrix profile
491
492 T_B : numpy.ndarray
493 The time series or sequence that will be used to annotate T_A. For every
494 subsequence in T_A, its nearest neighbor in T_B will be recorded.
495
496 m : int
497 Window size
498
499 ignore_trivial : bool
500 Set to `True` if this is a self-join. Otherwise, for AB-join, set this to
501 `False`. Default is `True`.
502
503 percentage : float
504 Approximate percentage completed. The value is between 0.0 and 1.0.
505
506 pre_scraamp : bool
507 A flag for whether or not to perform the PreSCRIMP calculation prior to
508 computing SCRIMP. If set to `True`, this is equivalent to computing
509 SCRIMP++ and may lead to faster convergence
510
511 s : int
512 The size of the PreSCRIMP fixed interval. If `pre_scraamp=True` and `s=None`,
513 then `s` will automatically be set to
514 `s=int(np.ceil(m / config.STUMPY_EXCL_ZONE_DENOM))`, the size of the exclusion
515 zone.
516
517 p : float, default 2.0
518 The p-norm to apply for computing the Minkowski distance. Minkowski distance is
519 typically used with `p` being 1 or 2, which correspond to the Manhattan distance
520 and the Euclidean distance, respectively.
521
522 k : int, default 1
523 The number of top `k` smallest distances used to construct the matrix profile.
524 Note that this will increase the total computational time and memory usage
525 when k > 1.
526
527 Attributes
528 ----------
529 P_ : numpy.ndarray
530 The updated (top-k) matrix profile. When `k=1` (default), this output is
531 a 1D array consisting of the matrix profile. When `k > 1`, the output
532 is a 2D array that has exactly `k` columns consisting of the top-k matrix
533 profile.
534
535 I_ : numpy.ndarray
536 The updated (top-k) matrix profile indices. When `k=1` (default), this output is

Calls

no outgoing calls