I have a retail store dataset, and I am interested to do some time series clustering on this data, what idea you find interesting for this purpose?

I have so far:

  • What sales trends there are across time?
  • What products customers will purchase at what time?
  • Customer segmentation across time?

Any better ideas?

  • 2
    $\begingroup$ Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. $\endgroup$
    – Community Bot
    Commented May 20, 2022 at 6:05

1 Answer 1


Time series could be applied for sales in various different fields. Here a quite extended view. There is the ones you've mentionned:

  • What sales trends there are across time.
  • What products customers will purchase at what time (day/week/month/year seasonality).
  • Customer segmentation across time.

And also other ones:

  • Sales predictions based on stock markets correlations (raw materials,etc.).
  • Sales predictions based on other events such as weather, celebration day, virus, scarcity and scarcity threats, inflation, etc. (can be found in news data source like twitter)
  • Correlation study between items in space or in time (ex: sales of a product A could lead later to sales of a product B).

If available:

  • Current customer profiles/population studies to make marketing predictions.
  • Historical demographic data to evaluate changes and trends (purchasing power, beliefs,etc.)
  • Items organisation. Some sales can be improved by puting related items next to each other (ex: sun glasses and ice cream).
  • $\begingroup$ Thank you, Given that I I have a retail dataset, and II I want to do time series clustering, and III I want to answer this question: which products correlated/clustered with each other across time; I have some follow-up questions if you can address please: 1) Which algorithms are the fastest and suitable: Partitional (kmeans), density based (DBSCAN or HDBSCAN with hierarchical), hierarchical (agglomerative)? 2) Which distance measure would be suitable; correlation distance, DTW, or some other measure (I am not including Euclidean)? $\endgroup$ Commented May 20, 2022 at 18:33
  • $\begingroup$ You have plenty of options to cluster data interestingly. I use to suggest a dimensional reduction algorithm (like t-SNE or UMAP) because it clusterizes data relatively well. Then, you can also apply the algorithms you've mentionned or even random forest: it is usually a good option. In addition to that, XGBoost could be even better (see towardsdatascience.com/…). $\endgroup$ Commented May 21, 2022 at 7:19
  • $\begingroup$ datascience.stackexchange.com/questions/111277/… $\endgroup$ Commented May 25, 2022 at 0:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.