# Classify multivariate time series

I have a set of data composed of time series (8 points) with about 40 dimensions (so each time series is 8 by 40). The corresponding ouput (the possible outcomes for the categories ) is eitheir 0 or 1.

What would be the best approach to design a classifier for time series with multiple dimensions ?

My initial strategy was to extract features from those time series : mean, std, maximum variation for each dimension. I obtained a dataset which I used to train a RandomTreeForest. Being aware of the total naivety of this, and after obtaining poor results, I am now looking for a more improved model.

My leads are the following : classify the series for each dimension (using KNN algorithm and DWT), reduce the dimensionality with PCA and use a final classifier along the multidimensions categories. Being relatively new to ML, I don't know if I am totally wrong.

• What you are doing is a pretty good approach. How many samples do you have in your dataset? Commented May 9, 2017 at 9:11
• I have about 500 000 time series (recalling that each time series is 8 timestamp * 40 dimensions ) Commented May 9, 2017 at 9:17
• Have you tried just using the 320 features raw? 320 features is not a lot for 500,000 samples Commented May 9, 2017 at 9:41
• @Jan van der Vegt : I have tried that method using a neural network, but the results were not so convincing - i used the raw data without any pre-processing. What operations should I apply beforehand on my 320-features raws to feed the classifier ? Commented May 9, 2017 at 10:50
• In case of a neural network normalizing your input is important, depending on the range of your features that might matter. But I would just feed the raw features into a RF and see how well that works, requires less tuning to see if you can get anything out of it easily Commented May 9, 2017 at 11:05

You're on the right track. Look at calculating a few more features, both in time and frequency domain. As long as number of samples >> number of features, you aren't likely to overfit. Is there any literature on a similar problem? If so, that always provides a great starting point.

Try a boosted tree classifier, like xgboost or LightGBM. They tend to be easier to tune hyperparameters, and provide good results with default parameters. Both Random Forest and boosted tree classifiers can return feature importance, so you can see which features are relevant to the problem. You can also try removing features to check for any covariance.

Most importantly though, if your results are unexpectedly poor, ensure your problem is properly defined. Manually check through your results to make sure there aren't any bugs in your pipeline.

If you're in Python, there are a couple of packages that can automatically extract hundreds or thousands of features from your timeseries, correlate them with your labels, choose the most significant, and train models for you.

https://github.com/blue-yonder/tsfresh

https://github.com/rtavenar/tslearn