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

Class floss

stumpy/floss.py:306–776  ·  view source on GitHub ↗

A class to compute the Fast Low-cost Online Semantic Segmentation (FLOSS) for streaming data Parameters ---------- mp : numpy.ndarray The first column consists of the matrix profile, the second column consists of the matrix profile indices, the third column cons

Source from the content-addressed store, hash-verified

304
305
306class floss:
307 """
308 A class to compute the Fast Low-cost Online Semantic Segmentation (FLOSS) for
309 streaming data
310
311 Parameters
312 ----------
313 mp : numpy.ndarray
314 The first column consists of the matrix profile, the second column
315 consists of the matrix profile indices, the third column consists of
316 the left matrix profile indices, and the fourth column consists of
317 the right matrix profile indices.
318
319 T : numpy.ndarray
320 A 1-D time series data used to generate the matrix profile and matrix profile
321 indices found in ``mp``. Note that the the right matrix profile index is used
322 and the right matrix profile is intelligently recomputed on the fly from ``T``
323 instead of using the bidirectional matrix profile.
324
325 m : int
326 The window size for computing sliding window mass. This is identical
327 to the window size used in the matrix profile calculation. For managing
328 edge effects, see the ``L`` parameter.
329
330 L : int
331 The subsequence length that is set roughly to be one period length.
332 This is likely to be the same value as the window size, ``m``, used
333 to compute the matrix profile and matrix profile index but it can
334 be different since this is only used to manage edge effects
335 and has no bearing on any of the IAC or CAC core calculations.
336
337 excl_factor : int, default 5
338 The multiplying factor for the regime exclusion zone. Note that this
339 is unrelated to the ``excl_zone`` used in to compute the matrix profile.
340
341 n_iter : int, default 1000
342 Number of iterations to average over when determining the parameters for
343 the IAC beta distribution.
344
345 n_samples : int, default 1000
346 Number of distribution samples to draw during each iteration when
347 computing the IAC.
348
349 custom_iac : numpy.ndarray, default None
350 A custom idealized arc curve (IAC) that will used for correcting the
351 arc curve.
352
353 normalize : bool, default True
354 When set to ``True``, this z-normalizes subsequences prior to computing
355 distances
356
357 p : float, default 2.0
358 The p-norm to apply for computing the Minkowski distance. Minkowski distance is
359 typically used with ``p`` being ``1`` or ``2``, which correspond to the
360 Manhattan distance and the Euclidean distance, respectively. This parameter is
361 ignored when ``normalize == True``.
362
363 T_subseq_isconstant_func : function, default None

Callers 5

test_flossFunction · 0.90
test_aamp_flossFunction · 0.90
test_floss_inf_nanFunction · 0.90
test_aamp_floss_inf_nanFunction · 0.90

Calls

no outgoing calls

Tested by 5

test_flossFunction · 0.72
test_aamp_flossFunction · 0.72
test_floss_inf_nanFunction · 0.72
test_aamp_floss_inf_nanFunction · 0.72