I am trying to classify similar looking curves of a timeseries and was wondering what is the best algorithm to research. Reading R, it looks like k-means clustering could be applied - but I don't know if there are better algorithms. Any pointers is much appreciated. My concern is if k-means could group points around a neighborhood of specific mean, but what if two curves with similar mean show different variance.
If the means are similar, then K-means will not do a great job. I would generate new features, perhaps based on higher moments of the distribution or some other properties (auto-correlation, summary of spectral density, etc.).
Using this new set of features, If you see separation of two curves when you plot draws in feature space then k-means would be an effective grouping algorithm.
It's hard to diagnose the best classification tool without better understanding the data generating process. For example, it might make sense to use a mixture of gaussians model instead.
This R task view page on clustering will provide a broad list of various tools you can use.
We have used Neural Networks for this purpose. What we did was this: select a set of characteristics which can be directly calculated from the time series (e.g., mean, standard deviation, skewness, kurtosis, p-value from a normal fit, ACF stats etc.), and then run an NN to learn from a set of timeseries about how to classify them. We were trying to classify which among a set of models would produce the best forecasts for a series. We had the forecast answers, since we used the M-Competition data.
Unfortunately, the results weren't great. May be we were looking at wrong set of characteristics, may be our classification were wrong. But this is definitely an way to solve the problem you mention. I would be interested in knowing if you get any success in this work.
I would also be interested if someone wants to collaborate on this investigation. Please see my profile for contact information.
My concern is if k-means (AKA lloyd algorithm) could group points around a neighborhood of specific mean, but what if two curves with similar mean show different variance.
K-means will groups curves which are close to an "average curve", but not necessarily close to a constant mean. Three very separated clusters can have the same mean. One being a cluster whose average is oscillating, the other one around an affine function, and the third one a constant function. In a sense you need to consider that each curve is a n-dimensional vector in the case where n is the number of points of discretization.
If you really don't want to use K-means, there is always the so-called "CLVQ algorithm" (competitive learning vector quantization) It should give similarresults.
More generally, quantization / clustering has extended to the functional case in "Functional quantization of Gaussian processes" by Luschgy and Pagès (Journal of functional analysis). The main result is that if you assume that your curves are independent draws of a Gaussian process, the optimal quantizer of that Gaussian process will span a principal space of its covariance operator, in other words, it will span the same finite-dimensional space as the first Karhunen-Loève eigenfunctions. This result as then been used by Tarpey and Kinateder in "Clustering Functional Data" (Journal of classification).