{'fraction_non_alphanumeric': 0.02488572879634332, 'fraction_numerical': 0.0, 'mean_word_length': 5.137071651090342, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Blazing Fast Time Series Segmentation Based on Update Techniques for Polynomial Approximations

Segmentation is an important step in processing and analyzing time series. In this article, we present an approach to speed up some standard time series segmentation techniques. Often, time series segmentation is based on piecewise polynomial approximations of the time series (including piecewise constant or linear approximations as special cases). Basically, a least-squares fit with a polynomial has a computational complexity that depends on the number of observations, i.e., the length of the time series. To improve the computational complexity of segmentation techniques we exploit the fact that approximations have to be repeated in sliding (moving) or growing time windows. Therefore, we suggest to use update techniques for the approximations that determine the approximating polynomial in a sliding or growing time window from an already existing one with a computational complexity that is independent of the number of observations, i.e., the length of the window. For that purpose bases of orthogonal polynomials must be used instead of standard bases such as monomials. We take two standard techniques for segmentation - the on-line algorithm SWAB (Sliding Window And Bottom-up) and the off-line technique OptSeg (Optimal Segmentation) - and show that the run-times can be reduced substantially for a given polynomial degree. If run-time constraints are given, e.g., in real-time applications, it would also be possible to adapt the degree of the approximating polynomials. Higher polynomial degrees typically result in lower modeling errors or longer segments. The various properties of the new realizations of segmentation techniques are outlined by means of some benchmark time series. The experimental results show that, depending on the chosen parameterization, OptSeg can be accelerated by some orders of magnitude, SWAB by a factor of up to about ten.