tslearn icon indicating copy to clipboard operation
tslearn copied to clipboard

QUESTION - How does tslearn.svm.TimeSeriesSVC work?

Open andre-don opened this issue 4 years ago • 2 comments

hello experts,

I have a small question about classifying multivariate time series using SVM. In tslearn there is the possibility to classify time series or multivariate time series using tslearn.svm.TimeSeriesSVC. But in the documentation there is no detailed explanation how exactly this svm creates a hyperplane with the "gak" kernel and classifies multivariate time series. Is there any article to read how exactly SVM does this classification with multivariate time series or could someone explain it briefly ?

Thanks in advance

andre-don avatar Jan 12 '21 15:01 andre-don

Hi @andre-don,

Not really an expert on SVMs either, but AFAIK it maps the data instances to some type of similarity space using a "kernel" function. In tslearn, this is a kernel specifically designed for time series. So an NxK data matrix is transformed to an NxN containing similarities. Then, a linear decision boundary is learned that maximizes the distances between the "support vectors". This is often done by some linear programming technique (with a quadratic objective).

Hope this helps. Do not hesitate to question further if need be.

GillesVandewiele avatar Jan 12 '21 15:01 GillesVandewiele

If the question is about the kernel itself, I guess both papers by Cuturi are of interest (see for example the dedicated page there: https://marcocuturi.net/GA.html)

And if the question is more about the specific multivariate case, then the only thing we do when features are p-dimensional is use Euclidean distance in R^p when a norm of the form $|x - y|$ is needed in the computations.

rtavenar avatar Jan 12 '21 15:01 rtavenar