:mod:`distancematrix.consumer.radius_profile` ============================================= .. py:module:: distancematrix.consumer.radius_profile Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: distancematrix.consumer.radius_profile.RadiusProfile0 distancematrix.consumer.radius_profile.RadiusProfile .. py:class:: RadiusProfile0(track_indices) Bases: :class:`distancematrix.consumer.abstract_consumer.AbstractConsumer` Consumer that calculates (common-k) radius profiles. The (common-k) radius profile tracks the distance between each subsequence and its k-th best match. It can be used to find subsequences with at least k repetitions (so called common motifs). This class has been optimised for finding matches without ignoring trivial matches. In other words, it is not possible to define an exclusion zone for the matches. .. method:: initialise(self, dims, query_subseq, series_subseq) Initialise this consumer. :param dims: the number of dimensions (data channels) this consumer will receive :param query_subseq: the number of query subsequences (rows in the distance matrix) :param series_subseq: the number of series subsequences (column in the distance matrix) :return: None .. method:: process_diagonal(self, diag, values) :abstractmethod: Method called when a diagonal of the distance matrix is calculated. The number of values on the diagonal might be less than the diagonal of the full matrix profile, this can occur when not enough data is available yet to calculate the entire distance matrix (typically for streaming when not enough data is available to fill the entire foreseen space). :param diagonal_index: index of the diagonal in range ]-num_query_subseq, num_series_subseq[, the main diagonal has index 0 :param values: array of shape (num_dimensions, num_values_on_diagonal) containing the distances :return: None .. method:: process_column(self, column_index, values) Method called when a column of the distance matrix is calculated. The number of values on the column might be less than the column of the full matrix profile, this can occur when not enough data is available yet to calculate the entire distance matrix (typically for streaming when not enough data is available to fill the entire foreseen space). :param column_index: index of the column, in range [0, series_subseq[ :param values: array of shape (num_dimensions, num_values_on_column) containing the distances :return: None .. py:class:: RadiusProfile(track_indices: Union[int, List[int]], exclude_distance: int) Bases: :class:`distancematrix.consumer.abstract_consumer.AbstractConsumer` Consumer that calculates (common-k) radius profiles. The (common-k) radius profile tracks the distance between each subsequence and its k-th best match. It can be used to find subsequences with at least k repetitions (so called common motifs). .. method:: initialise(self, dims, query_subseq, series_subseq) Initialise this consumer. :param dims: the number of dimensions (data channels) this consumer will receive :param query_subseq: the number of query subsequences (rows in the distance matrix) :param series_subseq: the number of series subsequences (column in the distance matrix) :return: None .. method:: process_diagonal(self, diag, values) :abstractmethod: Method called when a diagonal of the distance matrix is calculated. The number of values on the diagonal might be less than the diagonal of the full matrix profile, this can occur when not enough data is available yet to calculate the entire distance matrix (typically for streaming when not enough data is available to fill the entire foreseen space). :param diagonal_index: index of the diagonal in range ]-num_query_subseq, num_series_subseq[, the main diagonal has index 0 :param values: array of shape (num_dimensions, num_values_on_diagonal) containing the distances :return: None .. method:: process_column(self, column_index, values) Method called when a column of the distance matrix is calculated. The number of values on the column might be less than the column of the full matrix profile, this can occur when not enough data is available yet to calculate the entire distance matrix (typically for streaming when not enough data is available to fill the entire foreseen space). :param column_index: index of the column, in range [0, series_subseq[ :param values: array of shape (num_dimensions, num_values_on_column) containing the distances :return: None