extendedMD.pruning

extendedMD.pruning.extract_ts_from_pointers(ts, pointers)
Parameters:
  • ts (1d array) – 1-dimensional time-series either resulting from the PCA method or the original 1-dimensional time-series
  • pointers (list of int) – list of indexes related to the subsequence one wishes to extract from ts
Returns:

time-series subsequence

Return type:

1d array

extendedMD.pruning.prune_motifs(ts, sorted_dic_list, r)
Parameters:
  • ts (1d array) – 1-dimensional time-series either resulting from the PCA method or the original 1-dimensional time-series
  • sorted_dic_list (list of dic) – list of motif dictionaries returned from the emd algorithm, ordered by relevance
  • r (float) – maximum distance to the center of the motif
Returns:

list of dictionaries with the most relevant motifs

Return type:

list of dic

extendedMD.pruning.prune_motifs_with_dist(ts, motif_dic_list, r, mdl_bins)
Parameters:
  • ts (1d array) – 1-dimensional time-series either resulting from the PCA method or the original 1-dimensional time-series
  • motif_dic_list (list of dic) – list of motif dictionaries returned from the emd algorithm
  • r (float) – maximum distance to the center of the motif
  • mdl_bins (int) – number of bins to break the MDL cost range
Returns:

list of dictionaries with the most relevant motifs. The list is ordered based on MDL cost and motif’s compactness

Return type:

list of dic

extendedMD.pruning.prune_motifs_with_mdl(ts, motif_dic_list, r)

This function returns the most relevant motifs from the original list of motif extracted from the emd algorithm, based on the computed MDL cost and avoiding overlapping motifs

Parameters:
  • ts (1d array) – 1-dimensional time-series either resulting from the PCA method or the original 1-dimensional time-series
  • motif_dic_list (list of dic) – list of motif dictionaries returned from the emd algorithm
  • r (float) – maximum distance to the center of the motif
Returns:

list of dictionaries with the most relevant motifs. The list is ordered based on the MDL cost

Return type:

list of dic