tsseg.algorithms.patss.algorithms package

Submodules

tsseg.algorithms.patss.algorithms.ClaSP module

tsseg.algorithms.patss.algorithms.ClaSP.run_clasp(univariate_time_series, ground_truth, config, logger)[source]

Run ClaSP on the given time series to identify a semantic segmentation.

Parameters:
  • univariate_time_series – A list of pandas DataFrames, and each DataFrame consists of two columns: ‘average_value’ and ‘time’. Here, the list should consist of one DataFrame, thus a univariate time series

  • ground_truth – A dictionary containing the ground truth window size and ground truth number of segment boundaries

  • config – A dictionary containing the settings to use within ClaSP

  • logger (Logger) – A Logger object used for logging the progress of ClaSP

Returns:

A numpy array containing the identified segment boundaries, and the ClaSP object used to segment the time series.

tsseg.algorithms.patss.algorithms.FLOSS module

tsseg.algorithms.patss.algorithms.FLOSS.calc_parabola_vertex(x1, y1, x2, y2, x3, y3)[source]

I found this here: https://chris35wills.github.io/parabola_python/ Which was adapted from here: https://stackoverflow.com/questions/717762/how-to-calculate-the-vertex-of-a-parabola-given-three-points

tsseg.algorithms.patss.algorithms.FLOSS.run_floss(univariate_time_series, ground_truth, config, logger)[source]

Run FLOSS on the given time series to identify a semantic segmentation.

Parameters:
  • univariate_time_series – A list of pandas DataFrames, and each DataFrame consists of two columns: ‘average_value’ and ‘time’. Here, the list should consist of one DataFrame, thus a univariate time series

  • ground_truth – A dictionary containing the ground truth window size and ground truth number of segment boundaries

  • config – A dictionary containing the settings to use within FLOSS

  • logger (Logger) – A Logger object used for logging the progress of FLOSS

Returns:

A numpy array containing the identified segment boundaries, and the corrected arc crossing curve

tsseg.algorithms.patss.algorithms.PaTSS module

tsseg.algorithms.patss.algorithms.PaTSS.run_patss(directory, multivariate_time_series, length_time_series, config, logger)[source]

Run PaTSS on the given time series to identify a semantic segmentation with gradual state transitions.

Parameters:
  • directory – The directory containing the experiment that is being executed. This path will be used to save intermediate files

  • multivariate_time_series – A list of pandas DataFrames, and each DataFrame consists of two columns: ‘average_value’ and ‘time’.

  • length_time_series (int) – The length of the time series, that is the number of measurements

  • config – A dictionary containing the settings to use within PaTSS

  • logger (Logger) – A Logger object used for logging the progress of PaTSS

Returns:

A 2D-numpy area containing the probability distribution over the various semantic segments, a dictionary containing the embedding of every attribute with as key the attribute ID (index in multivariate_time_series list), and a dictionary containing the mined patterns that were used in the embedding with similar keys. The patterns for a certain attribute are ordered according to the embedding matrix at the same attribute. The embeddings were concatenated for segmentation, but we separate them such that we can verify on which parts PaTSS focuses within each attribute.

tsseg.algorithms.patss.algorithms.PaTSS_perso module

tsseg.algorithms.patss.algorithms.PaTSS_perso.probas_to_segments_and_change_points(nd_array)[source]
tsseg.algorithms.patss.algorithms.PaTSS_perso.run_patss(directory, multivariate_time_series, length_time_series, config=None)[source]

Run PaTSS on the given time series to identify a semantic segmentation with gradual state transitions.

Parameters:
  • directory – The directory containing the experiment that is being executed. This path will be used to save intermediate files

  • multivariate_time_series – A list of pandas DataFrames, and each DataFrame consists of two columns: ‘average_value’ and ‘time’.

  • length_time_series (int) – The length of the time series, that is the number of measurements

  • config – A dictionary containing the settings to use within PaTSS

  • logger – A Logger object used for logging the progress of PaTSS

Returns:

A 2D-numpy area containing the probability distribution over the various semantic segments, a dictionary containing the embedding of every attribute with as key the attribute ID (index in multivariate_time_series list), and a dictionary containing the mined patterns that were used in the embedding with similar keys. The patterns for a certain attribute are ordered according to the embedding matrix at the same attribute. The embeddings were concatenated for segmentation, but we separate them such that we can verify on which parts PaTSS focuses within each attribute.

tsseg.algorithms.patss.algorithms.PaTSS_perso.transform_to_dfs(time_series)[source]

Module contents