*************************** :py:mod:`wildboar.annotate` *************************** .. py:module:: wildboar.annotate .. autoapi-nested-parse:: Annotation of time series. See the :ref:`annotation section in the User Guide ` for more details and examples. .. !! processed by numpydoc !! Package Contents ---------------- Functions --------- .. autoapisummary:: wildboar.annotate.motifs wildboar.annotate.segment .. py:function:: motifs(x, mp=None, *, window='auto', exclude=0.2, max_distance='auto', max_neighbours=10, min_neighbours=1, max_motif=1, return_distance=False) Find motifs. :Parameters: **x** : array-like of shape (n_samples, n_timestep) The time series **mp** : ndarray or shape (n_samples, profile_size), optional The matrix profile. The matrix profile is computed if None. **window** : "auto", int or float, optional The window size of the matrix profile. - if "auto" the window is math.ceil(0.1 * n_timesteps) if mp=None, and the window of the matrix profile if mp is not None. - if float, a fraction of n_timestep - if int, the exact window size **exclude** : float, optional The size of the exclusion zone. **max_distance** : str, optional The maximum distance between motifs. **max_neighbours** : int, optional The maximum number of neighbours **min_neighbours** : int, optional The minimum number of neighbours **max_motif** : int, optional The maximum number of motifs to return. **return_distance** : bool, optional Return the distance from main to neighbours :Returns: **motif_indicies** : list List of arrays of motif neighbour indicies **motif_distance** : list, optional List of arrays of distance from motif to neighbours .. seealso:: :obj:`wildboar.distance.subsequence_match` find subsequence matches :obj:`wildboar.distance.matrix_profile` compute the matrix profile .. rubric:: References Yeh, C. C. M. et al. (2016). Matrix profile I: All pairs similarity joins for time series: a unifying view that includes motifs, discords and shapelets. In 2016 IEEE 16th international conference on data mining (ICDM) .. only:: latex .. !! processed by numpydoc !! .. py:function:: segment(x=None, *, mpi=None, n_segments=1, window=0.1, exclude=0.2, boundry=1.0, return_arc_curve=False) Find change regimes in a time series. :Parameters: **x** : array-like of shape (n_samples, n_timestep) or (n_timestep, ), optional The time series. If x is given, the matrix profile of x is computed. **mpi** : array-like of shape (n_samples, profile_size) or (profile_size), optional The matrix profile index. Must be given unless x is given. **n_segments** : int, optional The number of segmentations to identify **window** : int or float, optional The window size. The window parameter is ignored if mpi is not None. - if float, a fraction of n_timestep - if int, the exact window size **exclude** : float, optional The self-join exclusion for the matrix profile. Ignored if `mpi` is given. **boundry** : float, optional Ignore the region around each identified segmentation. Expressed as a fraction of `window`. **return_arc_curve** : bool, optional Return the arc curve. :Returns: **segments** : ndarray of shape (n_samples, n_segments), (n_segments) or int The start index of a segment **arc_curves** : ndarray of shape (n_samples, profile_size) or (profile_size, ) The arc curves .. seealso:: :obj:`wildboar.distance.matrix_profile` compute the matrix profile .. rubric:: References Gharghabi, Shaghayegh, et al. (2017) Matrix profile VIII: domain agnostic online semantic segmentation at superhuman performance levels. In proceedings of International Conference on Data Mining .. only:: latex .. !! processed by numpydoc !!