MENU

Fun & Interesting

Clustering Sales Records with K-Means and Dynamic Time Warping

mauricio montilla 8,208 lượt xem 3 years ago
Video Not Working? Fix It Now

Colab, Jupyter Notebook: https://colab.research.google.com/drive/1dtM0qkFrbOSX3aaSuQvA0bHgZH7q7J7w?usp=share_link

Optimization of resources is a critical topic for most organizations in the market. In this area, optimizing inventory levels can significantly impact the organizations' performance, i.e., having the right products on the shelves according to their sales patterns. In this paper, we analyze a dataset representing the monthly sales of thousands of products in a specific market to differentiate them according to their sales trends. For this purpose, we run cluster analysis for time series using the well-known K-Means algorithm with Dynamic Time Warping (DTW) as the distance metric to measure similarity between sequences. We choose to use Tslearn Python Library that implements DTW Barycenter Averaging (DBA) to calculate the center of the clusters iteratively.
The result of this work should offer a method to group products and draw inventory policies or build forecast models per group.

Comment