MCPcopy Index your code
hub / github.com/stumpy-dev/stumpy / _multi_mass

Function _multi_mass

stumpy/mstump.py:16–92  ·  view source on GitHub ↗

A multi-dimensional wrapper around "Mueen's Algorithm for Similarity Search" (MASS) to compute multi-dimensional distance profile. Parameters ---------- Q : numpy.ndarray Query array or subsequence T : numpy.ndarray Time series array or sequence m : in

(
    Q,
    T,
    m,
    M_T,
    Σ_T,
    μ_Q,
    σ_Q,
    T_subseq_isconstant,
    Q_subseq_isconstant,
    query_idx=None,
)

Source from the content-addressed store, hash-verified

14
15
16def _multi_mass(
17 Q,
18 T,
19 m,
20 M_T,
21 Σ_T,
22 μ_Q,
23 σ_Q,
24 T_subseq_isconstant,
25 Q_subseq_isconstant,
26 query_idx=None,
27):
28 """
29 A multi-dimensional wrapper around "Mueen's Algorithm for Similarity Search"
30 (MASS) to compute multi-dimensional distance profile.
31
32 Parameters
33 ----------
34 Q : numpy.ndarray
35 Query array or subsequence
36
37 T : numpy.ndarray
38 Time series array or sequence
39
40 m : int
41 Window size
42
43 M_T : numpy.ndarray
44 Sliding mean for `T`
45
46 Σ_T : numpy.ndarray
47 Sliding standard deviation for `T`
48
49 μ_Q : numpy.ndarray
50 Mean value of `Q`
51
52 σ_Q : numpy.ndarray
53 Standard deviation of `Q`
54
55 T_subseq_isconstant : numpy.ndarray
56 A boolean array that indicates whether a subsequence in `T` is constant (True)
57
58 Q_subseq_isconstant : numpy.ndarray
59 A boolean array that indicates whether the subsequence in `Q` is constant (True)
60
61 query_idx : int, default None
62 This is the index position along each of the time series in `T`, where
63 the query subsequence, `Q`, is located. `query_idx` should be set to None
64 if `Q` is not a subsequence of `T`. If `Q` is a subsequence of `T`, provding
65 this argument is optional. If query_idx is provided, the distance between Q
66 and `T[:, query_idx : query_idx + m]` will automatically be set to zero.
67
68 Returns
69 -------
70 D : numpy.ndarray
71 Multi-dimensional distance profile
72 """
73 d, n = T.shape

Callers 4

test_multi_mass_seededFunction · 0.90
test_multi_massFunction · 0.90
_multi_distance_profileFunction · 0.85

Calls

no outgoing calls

Tested by 3

test_multi_mass_seededFunction · 0.72
test_multi_massFunction · 0.72