I work with time series - vectors of length of $10^6$ real numbers.

I have a lot of these vectors and use some algorithms that have $O(n^2)$ time complexity (n - number of samples), so if I will try to analyse, i.e., thousand of time series at once, I will wait for ages.

I decided to perform a similarity-based clustering, divide the dataset into groups and perform the analysis independently within each group.

What I know about the data: we can consider $x$ time series as generated with covariance matrix $\Sigma_x$, $y$ time series with covariance matrix $\Sigma_y$ and so on. I do not know the number of different classes.

Question: how to do clustering? The simplest solution is to use correlations between time series as a distance measure, however, it is really rough and sensitive to outliers. Can PCA help in this case (PCA + k-means on several first components)?


1 Answer 1


First, what kind of data are your time series? What you expect to obtain clustering them? Use correlation as a distance meassure it is expressive enough to define the clusters? Those questions are up to you to answer since are the particularities of your experimentation.

Now, regarding the clustering process. There some specific meassures used to define similarity in time series. Regarding classification, the Euclidean distance is widely used with a 1NN classifier for time series classification. but sometimes in some context it is very particular and not so expressive, so there are other elastic similarity measures such as Dynamic Time Warping (DTW) for example.

Regarding your question, indeed you could use PCA to reduce dimension and then apply k-means to cluster the obtained projections. But once again depends in the characteristics of the clustering process, and the information you expect to obtain from it.

Check this material


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.