Time series clustering

Time series clustering groups time series data into separate clusters. This type of grouping offers two advantages:

  • Gain more insight into your products – If you have thousands of products, you might be interested in knowing which of their demand time series show similar behavior. Which products exhibit the same seasonality? Which products are trending together? Which products have similar demand spikes and level shifts? Answers to these questions can help you better manage your inventory, understand customer behavior, and plan for future products.
  • Perform demand modeling more efficiently - Traditional modeling involves finding the best forecasting algorithm, the best set of causal variables, and the best causal elimination strategy for each SKU. Instead, you can use time series clustering to model a single time series in a cluster, and then apply that model to all the time series within that cluster. This saves time. If you have 10,000 SKUs, it becomes practically impossible to analyze each time series individually. However, if you form 5 or 6 clusters, the analysis of only those 5 or 6 time series might be sufficient for your purposes.

In clustering, objects that are “similar” to each other are placed into the same cluster. But with time series data, how can you calculate “similarity” between two time-series?

If two time series have similar shape, and/or the point-wise distances between them are small, you can say that they are similar to each other and can thus be put in the same cluster. For example:

You can calculate distances between points of the first time-series and points of the second time-series, and then sum those distances to quantify the measure of their similarity. The lower the sum of the distances, the more similar the time series. However, this distance-based measure has a few limitations, and the greatest limitation is that it is computationally expensive to calculate distances between all pairs of time series. To address this problem, Demand Guru uses feature extraction.

Last modified: Thursday December 19, 2024

Is this useful?