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

Function maamp_mdl

stumpy/maamp.py:197–300  ·  view source on GitHub ↗

Compute the multi-dimensional number of bits needed to compress one multi-dimensional subsequence with another along each of the k-dimensions using the minimum description length (MDL) Parameters ---------- T : numpy.ndarray The time series or sequence for which the

(
    T,
    m,
    subseq_idx,
    nn_idx,
    include=None,
    discords=False,
    discretize_func=None,
    n_bit=8,
    p=2.0,
)

Source from the content-addressed store, hash-verified

195
196
197def maamp_mdl(
198 T,
199 m,
200 subseq_idx,
201 nn_idx,
202 include=None,
203 discords=False,
204 discretize_func=None,
205 n_bit=8,
206 p=2.0,
207):
208 """
209 Compute the multi-dimensional number of bits needed to compress one
210 multi-dimensional subsequence with another along each of the k-dimensions
211 using the minimum description length (MDL)
212
213 Parameters
214 ----------
215 T : numpy.ndarray
216 The time series or sequence for which the multi-dimensional matrix profile,
217 multi-dimensional matrix profile indices were computed
218
219 m : int
220 Window size
221
222 subseq_idx : numpy.ndarray
223 The multi-dimensional subsequence indices in T
224
225 nn_idx : numpy.ndarray
226 The multi-dimensional nearest neighbor index in T
227
228 include : numpy.ndarray, default None
229 A list of (zero-based) indices corresponding to the dimensions in `T` that
230 must be included in the constrained multidimensional motif search.
231 For more information, see Section IV D in:
232
233 `DOI: 10.1109/ICDM.2017.66 \
234 <https://www.cs.ucr.edu/~eamonn/Motif_Discovery_ICDM.pdf>`__
235
236 discords : bool, default False
237 When set to `True`, this reverses the distance profile to favor discords rather
238 than motifs. Note that indices in `include` are still maintained and respected.
239
240 discretize_func : func, default None
241 A function for discretizing each input array. When this is `None`, an
242 appropriate discretization function (based on the `normalization` parameter)
243 will be applied.
244
245 n_bit : int, default 8
246 The number of bits used for discretization and for computing the bit size. For
247 more information on an appropriate value, see Figure 4 in:
248
249 `DOI: 10.1109/ICDM.2016.0069 \
250 <https://www.cs.ucr.edu/~eamonn/PID4481999_Matrix%20Profile_III.pdf>`__
251
252 and Figure 2 in:
253
254 `DOI: 10.1109/ICDM.2011.54 \

Callers 3

test_mdlFunction · 0.90
test_maamp_mdlFunction · 0.90
aamp_mmotifsFunction · 0.70

Calls

no outgoing calls

Tested by 2

test_mdlFunction · 0.72
test_maamp_mdlFunction · 0.72