extendedMD.motifs

extendedMD.motifs.build_motif_dic_from_pattern(bs_subseq_dic_list, bs_len, pattern, r)

This function builds the motif dictionary related to the pattern given as input

Parameters:
  • bs_subseq_dic_list (list of dic) – list of dictionaries where each dic represents a single BS subsequence
  • bs_len (list of int) – list of the lengths of each BS sequence
  • pattern (list of str) – list of sax words that made up the pattern
  • r (float) – maximum distance to the center of the motif
Returns:

motif_dic

Return type:

dic

extendedMD.motifs.find_all_motif_candidates(ts, bs_seq, bs_len, bs_pointers, r)

This function finds all the motif candidates of all sizes and saves each motif instance in a dictionary. The result is a list of dictionaries.

Parameters:
  • ts (1d array) – original 1-d time-series
  • bs_seq (list of str) – list of modified sax words (i.e. BS sequence)
  • bs_len (list of int) – list of the lengths of each BS sequence
  • bs_pointers (list of list of int) – list of pointers to the original time-series
  • r (float) – maximum distance to the center of the motif
Returns:

motif_dic_list

Return type:

list of dic

extendedMD.motifs.transform_members_list_into_motif_dic(center_dic, members_dic_list, mdl_cost, mean_dist)

This functions creates the dictionary related to the motif composed by the subsequences in members_dic_list

Parameters:
  • center_dic (dic) – dictionary related to the center of motif
  • members_dic_list (list of dic) – list of dictionaries related to all the subsequences that belong to the motif
  • mdl_cost (float) – MDL cost of the motif (as defined by Tanaka et all)
  • mean_dist (float) – mean distance between all the pair of motif’s members
Returns:

motif_dic

Return type:

dic