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
(
T,
m,
subseq_idx,
nn_idx,
include=None,
discords=False,
discretize_func=None,
n_bit=8,
normalize=True,
p=2.0,
T_subseq_isconstant=None,
)
| 290 | |
| 291 | @core.non_normalized(maamp_mdl, exclude=["normalize", "T_subseq_isconstant"]) |
| 292 | def mdl( |
| 293 | T, |
| 294 | m, |
| 295 | subseq_idx, |
| 296 | nn_idx, |
| 297 | include=None, |
| 298 | discords=False, |
| 299 | discretize_func=None, |
| 300 | n_bit=8, |
| 301 | normalize=True, |
| 302 | p=2.0, |
| 303 | T_subseq_isconstant=None, |
| 304 | ): |
| 305 | """ |
| 306 | Compute the multi-dimensional number of bits needed to compress one |
| 307 | multi-dimensional subsequence with another along each of the ``k``-dimensions |
| 308 | using the minimum description length (MDL) |
| 309 | |
| 310 | Parameters |
| 311 | ---------- |
| 312 | T : numpy.ndarray |
| 313 | The time series or sequence for which the multi-dimensional matrix profile, |
| 314 | multi-dimensional matrix profile indices were computed. |
| 315 | |
| 316 | m : int |
| 317 | Window size. |
| 318 | |
| 319 | subseq_idx : numpy.ndarray |
| 320 | The multi-dimensional subsequence indices in ``T`` |
| 321 | |
| 322 | nn_idx : numpy.ndarray |
| 323 | The multi-dimensional nearest neighbor index in ``T`` |
| 324 | |
| 325 | include : numpy.ndarray, default None |
| 326 | A list of (zero-based) indices corresponding to the dimensions in ``T`` that |
| 327 | must be included in the constrained multidimensional motif search. |
| 328 | For more information, see Section IV D in: |
| 329 | |
| 330 | `DOI: 10.1109/ICDM.2017.66 \ |
| 331 | <https://www.cs.ucr.edu/~eamonn/Motif_Discovery_ICDM.pdf>`__ |
| 332 | |
| 333 | discords : bool, default False |
| 334 | When set to ``True``, this reverses the distance profile to favor discords |
| 335 | rather than motifs. Note that indices in ``include`` are still maintained |
| 336 | and respected. |
| 337 | |
| 338 | discretize_func : func, default None |
| 339 | A function for discretizing each input array. When this is ``None``, an |
| 340 | appropriate discretization function (based on the ``normalization`` parameter) |
| 341 | will be applied. |
| 342 | |
| 343 | n_bit : int, default 8 |
| 344 | The number of bits used for discretization and for computing the bit size. For |
| 345 | more information on an appropriate value, see Figure 4 in: |
| 346 | |
| 347 | `DOI: 10.1109/ICDM.2016.0069 \ |
| 348 | <https://www.cs.ucr.edu/~eamonn/PID4481999_Matrix%20Profile_III.pdf>`__ |
| 349 |