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

Function fluss

stumpy/floss.py:232–303  ·  view source on GitHub ↗

Compute the Fast Low-cost Unipotent Semantic Segmentation (FLUSS) for static data (i.e., batch processing) Essentially, this is a wrapper to compute the corrected arc curve and regime locations. Note that since the matrix profile indices, ``I``, are pre-computed, this function

(I, L, n_regimes, excl_factor=5, custom_iac=None)

Source from the content-addressed store, hash-verified

230
231
232def fluss(I, L, n_regimes, excl_factor=5, custom_iac=None):
233 """
234 Compute the Fast Low-cost Unipotent Semantic Segmentation (FLUSS)
235 for static data (i.e., batch processing)
236
237 Essentially, this is a wrapper to compute the corrected arc curve and
238 regime locations. Note that since the matrix profile indices, ``I``, are
239 pre-computed, this function is agnostic to subsequence normalization.
240
241 Parameters
242 ----------
243 I : numpy.ndarray
244 The matrix profile indices for the time series of interest.
245
246 L : int
247 The subsequence length that is set roughly to be one period length.
248 This is likely to be the same value as the window size, ``m``, used
249 to compute the matrix profile and matrix profile index but it can
250 be different since this is only used to manage edge effects
251 and has no bearing on any of the IAC or CAC core calculations.
252
253 n_regimes : int
254 The number of regimes to search for. This is one more than the
255 number of regime changes as denoted in the original paper.
256
257 excl_factor : int, default 5
258 The multiplying factor for the regime exclusion zone.
259
260 custom_iac : numpy.ndarray, default None
261 A custom idealized arc curve (IAC) that will used for correcting the
262 arc curve.
263
264 Returns
265 -------
266 cac : numpy.ndarray
267 A corrected arc curve (CAC).
268
269 regime_locs : numpy.ndarray
270 The locations of the regimes.
271
272 See Also
273 --------
274 stumpy.floss : Compute the Fast Low-Cost Online Semantic Segmentation (FLOSS) for
275 streaming data
276
277 Notes
278 -----
279 `DOI: 10.1109/ICDM.2017.21 <https://www.cs.ucr.edu/~eamonn/Segmentation_ICDM.pdf>`__
280
281 See Section A
282
283 This is the implementation for Fast Low-cost Unipotent Semantic
284 Segmentation (FLUSS).
285
286 Examples
287 --------
288 >>> import stumpy
289 >>> import numpy as np

Callers 1

test_flussFunction · 0.90

Calls 2

_cacFunction · 0.85
_reaFunction · 0.85

Tested by 1

test_flussFunction · 0.72