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

Class stimped

stumpy/stimp.py:591–765  ·  view source on GitHub ↗

A class to compute the Pan Matrix Profile with a ``dask``/``ray`` cluster This is based on the SKIMP algorithm. Parameters ---------- client : client A ``dask``/``ray`` client. Setting up a ``dask``/``ray`` cluster is beyond the scope of this library. Please re

Source from the content-addressed store, hash-verified

589 replace={"pre_scrump": "pre_scraamp"},
590)
591class stimped(_stimp):
592 """
593 A class to compute the Pan Matrix Profile with a ``dask``/``ray`` cluster
594
595 This is based on the SKIMP algorithm.
596
597 Parameters
598 ----------
599 client : client
600 A ``dask``/``ray`` client. Setting up a ``dask``/``ray`` cluster is beyond
601 the scope of this library. Please refer to the ``dask``/``ray``
602 documentation.
603
604 T : numpy.ndarray
605 The time series or sequence for which to compute the pan matrix profile.
606
607 min_m : int, default 3
608 The starting (or minimum) subsequence window size for which a matrix profile
609 may be computed.
610
611 max_m : int, default None
612 The stopping (or maximum) subsequence window size for which a matrix profile
613 may be computed. When ``max_m = None``, this is set to the maximum allowable
614 subsequence window size
615
616 step : int, default 1
617 The step between subsequence window sizes.
618
619 normalize : bool, default True
620 When set to ``True``, this z-normalizes subsequences prior to computing
621 distances. Otherwise, this function gets re-routed to its complementary
622 non-normalized equivalent set in the ``@core.non_normalized`` function
623 decorator.
624
625 p : float, default 2.0
626 The p-norm to apply for computing the Minkowski distance. Minkowski distance is
627 typically used with ``p`` being ``1`` or ``2``, which correspond to the
628 Manhattan distance and the Euclidean distance, respectively. This parameter is
629 ignored when ``normalize == True``.
630
631 T_subseq_isconstant_func : function, default None
632 A custom, user-defined function that returns a boolean array that indicates
633 whether a subsequence in ``T`` is constant (``True``). The function must
634 only take two arguments, ``a``, a 1-D array, and ``w``, the window size,
635 while additional arguments may be specified by currying the user-defined
636 function using ``functools.partial``. Any subsequence with at least one
637 ``np.nan``/``np.inf`` will automatically have its corresponding value set
638 to ``False`` in this boolean array.
639
640 Attributes
641 ----------
642 PAN_ : numpy.ndarray
643 The transformed (i.e., normalized, contrasted, binarized, and repeated)
644 pan matrix profile.
645
646 M_ : numpy.ndarray
647 The full list of (breadth first search (level) ordered) subsequence window
648 sizes.

Callers 4

test_stimpedFunction · 0.90
test_stimpedFunction · 0.90
test_stimped_rayFunction · 0.90

Calls

no outgoing calls

Tested by 4

test_stimpedFunction · 0.72
test_stimpedFunction · 0.72
test_stimped_rayFunction · 0.72