2
$\begingroup$

I'm doing a project related to identifying sales dynamics. My database contains 26 weeks after launching the product (so 26 time-series observations equally spaced in time).

http://imageshack.com/a/img18/5628/l5qg.jpg

http://imageshack.com/a/img34/8953/yh6i.jpg

I used two methods of time-series clustering to see which patterns dominate in different groups (clustering by units_sold_that_week). The first method is based on k-medoids and the second one connected with clustering by parameters of growth models.

My next step is to make forecasts based on these clusters. Is there any special method for forecasting based on time-series clusters? In my project, I have to combine the topic of clustering and forecasting on clusters.

I am running my analyses in R, so I would be grateful for any suggestions regarding R procedures.

Please note that I am relatively new to time series analysis so any clarity you could provide, on R or any package you could recommend that would help accomplish this task efficiently, would be appreciated.

$\endgroup$
2
  • 1
    $\begingroup$ As @GiorgioSpedicato suggests, dynamic time warping (DTW) is the way to go. There is a very nice example in the link suggested by Giorgio Spedicato that clearly explains how to cluster time series, then you could apply any forecasting method in R forecast Package. It looks like you are using weekly data, you could use stlf function in R forecast package which handles high frequency time series. $\endgroup$
    – forecaster
    Commented Apr 1, 2014 at 22:21
  • $\begingroup$ Try for PSF (researchgate.net/publication/…). The R package is available CRAN named as PSF. $\endgroup$ Commented Jul 8, 2016 at 18:38

2 Answers 2

1
$\begingroup$

So there are series of R package for doing similar thing; but in a different context. The examples are from gene expression data, where they have expression measurement in a course of time series. You just to look into their example, make your data look like them and run the analysis.

Some of the method use Dirichlet Processing mixture model like this and some others are extended version of conventional clustering methods like this one. Mfuzz is another R package and also this one

I hope it helps you

$\endgroup$
1
  • $\begingroup$ I was trying to use kml, but an error occured. Can you help me what 'contains trajectories to cluster' means which is the first variable of procedure kml() ? I want to cluster variable units_sold by time, so i tried with t(units_sold) but it do not work $\endgroup$
    – peterpeter
    Commented Apr 6, 2014 at 5:04
3
$\begingroup$

Times ago I went to this website Rdatamining that suggested dynamic time warping for time series classification. Basically, it uses dynamic time warping to evaluate a distance between time series and to cluster them based on that distance. Within cluster you might have a look to hierarchical time series clustering as proposed in the hts R package (for the theory have a look to Roby Hyndman Forecast Book Chapter).

$\endgroup$

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.