Compress Time Series by Clustering
The method compresses a time series (or several time series with the same time points) to a certain number of data points by clustering the data values.
Although the compressed time series has fewer data points than the original time series, it behaves similarly during optimization. The compressed time series is always an abstract time series.
During clustering, closely spaced data points of the original time series are assigned to a cluster. In the compressed time series, the weighted average of the data values of a cluster is the only data value that represents the entire cluster. Alternatively, the value existing in the original time series closest to the calculated mean value can be used as the center (i.e., as the resulting data value of the compressed time series). The time step width of a data point in the compressed time series corresponds to the sum of the time step lengths of all elements of the associated cluster.
The following figure illustrates the compression process schematically.
The desired number of clusters can be specified.
Optionally, the maxima and/or minima of the time series can be added separately so that the compressed time series has the same minimum and/or maximum as the original time series. If this option is activated, the extreme points are ignored during the compression process and only added as additional data points at the end. This increases the number of clusters beyond the given number.
If \( k \) is the number of desired clusters and \( n \) is the number of time series to be compressed, the compressed time series has
Applying the Method
To compress the data values of a time series, use the menu items Methods → Convert time series → Compress time series (see following figure).
In the window that opens (see following figure), the time series to be compressed are selected with Select time series. A multiple selection is possible.
If several time series are to be compressed at once, they must have the same data points. If this is not the case, an error handling window will open.
Select a method to resolve the conflict: Synchronize or Assemble (merge).
Specify the Number of clusters. Integer values between 2 and the number of data points of the time series to be compressed are possible.
Decide whether to Add maxima and minima and Use existing values as centers.
Finally, select whether the existing time series should be overwritten with the new values or whether a new time series should be created with the new values.
Example
The following figure shows the original time series Electricity Demand GFaI Building and the result of compressing to five clusters by adding the minima and maxima.





