2
$\begingroup$

I want to do supervised classification on time series data with Dynamic Time Warping (DTW) and nearest neighbour approach. What is the best way to determine a reference time series for each class?

It is right, that I do not need a reference time series in terms of statistical results. However, in my real-time setting, calculating the DTW for a new time series to all available labelled training time series (potentially thousands to tens of thausands) takes a whole lot of time. Thus, for each class I want to reduce the number of reference time series to a manageable number.

$\endgroup$
2
$\begingroup$

The concept of nearest neighbour classification does not require a reference time series.

For each incoming, new object (here time series) you will compute the distance (here DTW) to all known and labelled time series. Then you assign the majority label of the k closest labelled time series.

Using a reference time series would lead to a big loss of information that will negatively affect the accuracy in most cases. If you yet think that you need a reference time series, please expand your question with further information.

Update 1: For efficient and fast computation of DTW Distance between two time series, I recommend this paper Stream Monitoring under the Time Warping Distance

Update 2: As reference time series, you could either create a mean time series for each class (they would have to be of equal size) or you identify the prototype time series for each class as the one which has the least distance to all other time series in its class.

Yet using reference time series for each class neglects the fact of class imbalance. Further you disregard intra-class variance which I assume is not equal among all classes.

$\endgroup$
  • $\begingroup$ Please see my update to my question: It is right, that I do not need a reference time series in terms of statistical results. However, in my real-time setting, calculating the DTW for a new time series to all available labelled training time series takes a whole lot of time. Thus, for each class I want to reduce the number of reference time series to a manageable number. $\endgroup$ – Make42 Aug 28 '17 at 12:20
  • 1
    $\begingroup$ +1, there are many speed-up techniques available. For instance, the use of lower bound functions can greatly reduce the number of DTW calculations. In the past, I have found these slides to be very helpful. $\endgroup$ – knrumsey - Reinstate Monica Jun 21 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.