<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Time Series Classification in Dissimilarity Spaces</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Brijnesh J. Jain</string-name>
          <email>jain@dai-labor.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Stephan Spiegel</string-name>
          <email>spiegel@dai-labor.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Berlin Institute of Technology</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2015</year>
      </pub-date>
      <abstract>
        <p>Time series classification in the dissimilarity space combines the advantages of the dynamic time warping and the rich mathematical structure of Euclidean spaces. We applied dimension reduction using PCA followed by support vector learning on dissimilarity representations to 43 UCR datasets. Results indicate that time series classification in dissimilarity space has potential to complement the state-of-the-art.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
    </sec>
    <sec id="sec-2">
      <title>Dissimilarity Representations of Time Series</title>
      <p>2.1</p>
      <sec id="sec-2-1">
        <title>Dynamic Time Warping Distance</title>
        <p>A time series of length n is an ordered sequence x = (x1; : : : ; xn) with features
xi 2 R sampled at discrete points of time i 2 [n] = f1; : : : ; ng. To define the
DTW distance between time series x and y of length n and m, resp., we construct
a grid G = [n] [m]. A warping path in grid G is a sequence = (t1; : : : ; tp)
consisting of points tk = (ik; jk) 2 G such that
1. t1 = (1; 1) and tp = (n; m)
2. tk+1 tk 2 f(1; 0); (0; 1); (1; 1)g
(boundary conditions)
(warping conditions)
for all 1
along</p>
        <p>k &lt; p. The cost of warping x = (x1; : : : ; xn) and y = (y1; : : : ; ym)
is defined by
d (x; y) =</p>
        <p>X (xi</p>
        <p>yj )2;
(i;j)2
where (xi yj )2 is the local transformation cost of assigning features xi to yj .
Then the distance function</p>
        <p>d(x; y) = min d (x; y);
is the dynamic time warping (DTW) distance between x and y, where the
minimum is taken over all warping paths in G.
2.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Dissimilarity Representations</title>
        <p>Let (T ; d) be a time series space T endowed with the DTW distance d. Suppose
that we are given a subset</p>
        <p>P = fp1; : : : ; pkg</p>
        <p>T
of k reference time series pi 2 T , called prototypes henceforth. The set P of
prototypes gives rise to a function of the form
: T ! Rk;</p>
        <p>x 7! (d(x; p1); : : : ; d(x; pk));
where Rk is the dissimilarity space of (T ; d) with respect to P. The k-dimensional
vector (x) is the dissimilarity representation of x. The i-th feature of (x)
represents the dissimilarity d(x; pi) between x and the i-th prototype pi.
2.3</p>
      </sec>
      <sec id="sec-2-3">
        <title>Learning Classifiers in Dissimilarity Space</title>
        <p>Suppose that</p>
        <p>X = f(x1; y1); : : : ; (xn; yn)g</p>
        <p>
          T
is a training set consisting of n time series xi with corresponding class labels
yi 2 Y. Learning in dissimilarity space proceeds in three steps: (
          <xref ref-type="bibr" rid="ref1">1</xref>
          ) select a
Y:
suitable set of prototypes P on the basis of the training set D, (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ) embed time
series into the dissimilarity space by means of their dissimilarity representations,
and (
          <xref ref-type="bibr" rid="ref3">3</xref>
          ) learn a classifier in the dissimilarity space according to the empirical risk
minimization principle.
        </p>
        <p>The performance of a classifier learned in dissimilarity spaces crucially
depends on a proper dissimilarity representation of the time series. We distinguish
between two common approaches:
1. Prototype selection: construct a set of prototypes P from the training set X .
2. Dimension reduction: perform dimension reduction in the dissimilarity space.</p>
        <p>There are numerous strategies for prototype selection. Naive examples
include all elements of the training set X and sampling a random subset of X . For
more sophisticated selection methods, we refer to [8]. Dimension reduction of
the dissimilarity representation includes methods such as, for example, principal
component analysis (PCA).
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Experiments</title>
      <p>
        The goal of this experiment is to assess the performance of the following classifiers
in dissimilarity space: (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) nearest neighbor using the Euclidean distance
(EDDS), (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) support vector machine (SVM), and (
        <xref ref-type="bibr" rid="ref3">3</xref>
        ) principal component analysis on
dissimilarity representations followed by support vector machine (PCA+SVM).
3.1
      </p>
      <sec id="sec-3-1">
        <title>Experimental Protocol</title>
        <p>We considered 43 datasets from the UCR time series datasets [4], each of which
comes with a pre-defined training and test set. For each dataset we used the
whole training set as prototype set. To embed the training and test examples
into a dissimilarity space, we computed their DTW distances to the prototypes.</p>
        <p>We trained all SVMs with RBF-kernel using the embedded training examples.
We selected the parameters and C of the RBF-kernel over a two-dimensional
grid with points ( i; Cj ) = (2i; 2j ), where i; j are 30 equidistant values from
[ 10; 10]. For each parameter configuration ( i; Cj ) we performed 10-fold
crossvalidation and selected the parameters ( ; C ) with the lowest average
classification error. Then we trained the SVM on the whole embedded training set
using the selected parameters ( ; C ). Finally, we applied the learned model to
the embedded test examples for estimating the generalization performance.</p>
        <p>For PCA+SVM we performed dimension reduction using PCA prior training
of the SVM. We considered the q first dimensions with highest variance, where
q 2 f1; 1 + a; 1 + 2a; : : : : ; 1 + 19ag with a being the closest integer of k=20 and
k is the dimension of the dissimilarity space. For each q, we performed
hyperparameter selection for the SVM as described above. We selected the parameter
configuration (q ; ; C ) that gave the lowest classification error. Then we
applied PCA on the whole embedded training set, retained the first q dimensions
and trained the SVM on the embedded training set after dimension reduction.
80  
S  60  
D
-­‐
D
E 40  
20  
0  
100  
80  
 
VM60  
S+  
CPA40  
20  
0  
Finally we reduced the dimension of the embedded test examples and applied
the learned model.
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Results</title>
        <p>Figure 1 shows the scatter plots of predictive accuracy of the nearest neighbor
using DTW against all three dissimilarity space methods and Table 1 shows the
error rates of all classifiers for each dataset.</p>
        <p>The first observation to be made is that the dissimilarity space endowed with
the Euclidean space is less discriminative than the time series space endowed with
the DTW distance. As shown by Figure 1, nearest neighbor (NN) with DTW
performed better than the ED-DS classifier in 34 out of 42 cases. Since the DTW
distance is non-Euclidean, dissimilarity spaces form a distorted representation of
the time series space in such a way that neighborhood relations are not preserved.
In most cases, these distortions impact classification results negatively, often by
a large margin. In the few cases where the distortions improve classification
DTW</p>
        <p>ED-DS</p>
        <p>SVM
results, the improvements are only small and could also be occurred by chance
due to the random sampling of the training and test set.</p>
        <p>The second observation to be made is that the SVM using all prototypes
complements NN+DTW. Better and worse predictive performance of both
classifiers is balanced. This shows that powerful learning algorithms can partially
compensate for poor representations.</p>
        <p>The third observation to be made is that SVM+PCA outperformed all other
classifiers. Furthermore, SVM+PCA is better than NN+DTW in 28 and worse
in 9 out of 42 cases. By reducing the dimension using PCA, we obtain better
dissimilarity representations for classification. Table 1 highlights relative
improvements and declines of PCA+SVM compared to NN+DTW with 10% or
more in blue and red color, respectively. We observe a relative change of at least
10% in 27 out of 43 cases. This finding supports our hypothesis that learning
on dissimilarity representations complements NN+DTW.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Conclusion</title>
      <p>This paper is a first step to explore dissimilarity space learning for time series
classification under DTW. Results combining PCA with SVM on dissimilarity
representations are promising and complement nearest neighbor methods
using DTW in time series spaces. Future work aims at exploring further elastic
distances, prototype selection, dimension reduction, and learning methods.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>G.E.</given-names>
            <surname>Batista</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Wang</surname>
          </string-name>
          , and
          <string-name>
            <given-names>E.J.</given-names>
            <surname>Keogh</surname>
          </string-name>
          .
          <article-title>A Complexity-Invariant Distance Measure for Time Series</article-title>
          .
          <source>SIAM International Conference on Data Mining</source>
          ,
          <volume>11</volume>
          :
          <fpage>699</fpage>
          -
          <lpage>710</lpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>T.</given-names>
            <surname>Fu</surname>
          </string-name>
          .
          <article-title>A review on time series data mining</article-title>
          .
          <source>Engineering Applications of Artificial Intelligence</source>
          ,
          <volume>24</volume>
          (
          <issue>1</issue>
          ):
          <fpage>164</fpage>
          -
          <lpage>181</lpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>P.</given-names>
            <surname>Geurts</surname>
          </string-name>
          .
          <article-title>Pattern extraction for time series classification</article-title>
          .
          <source>Principles of Data Mining and Knowledge Discovery</source>
          , pp.
          <fpage>115</fpage>
          -
          <lpage>127</lpage>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>E.</given-names>
            <surname>Keogh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Zhu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Hu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Hao.</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Xi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Wei</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C. A.</given-names>
            <surname>Ratanamahatana</surname>
          </string-name>
          . The UCR Time Series Classification/Clustering Homepage: www.cs.ucr.edu/~eamonn/ time_series_data/,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>J.</given-names>
            <surname>Lines</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Bagnall</surname>
          </string-name>
          .
          <article-title>Time series classification with ensembles of elastic distance measures</article-title>
          .
          <source>Data Mining and Knowledge Discovery</source>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>L.</given-names>
            <surname>Livi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Rizzi</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Sadeghian</surname>
          </string-name>
          .
          <article-title>Optimized dissimilarity space embedding for labeled graphs</article-title>
          .
          <source>Information Sciences</source>
          ,
          <volume>266</volume>
          :
          <fpage>47</fpage>
          -
          <lpage>64</lpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>E.</given-names>
            <surname>Pekalska</surname>
          </string-name>
          and
          <string-name>
            <surname>R.P.W. Duin</surname>
          </string-name>
          <article-title>The Dissimilarity Representation for Pattern Recognition</article-title>
          . World Scientific Publishing Co., Inc.,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>E.</given-names>
            <surname>Pekalska</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.P.W.</given-names>
            <surname>Duin</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Paclik</surname>
          </string-name>
          .
          <article-title>Prototype selection for dissimilarity-based classifiers</article-title>
          .
          <source>Pattern Recognition</source>
          ,
          <volume>39</volume>
          (
          <issue>2</issue>
          ):
          <fpage>189</fpage>
          -
          <lpage>208</lpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>K.</given-names>
            <surname>Riesen</surname>
          </string-name>
          and
          <string-name>
            <given-names>H.</given-names>
            <surname>Bunke</surname>
          </string-name>
          .
          <article-title>Graph classification based on vector space embedding</article-title>
          .
          <source>International Journal of Pattern Recognition and Artificial Intelligence</source>
          ,
          <volume>23</volume>
          (
          <issue>6</issue>
          ):
          <fpage>1053</fpage>
          -
          <lpage>1081</lpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>X.</given-names>
            <surname>Xi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Keogh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Shelton</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Wei</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.A.</given-names>
            <surname>Ratanamahatana</surname>
          </string-name>
          .
          <article-title>Fast time series classification using numerosity reduction</article-title>
          .
          <source>International Conference on Machine Learning</source>
          , pp.
          <fpage>1033</fpage>
          -
          <lpage>1040</lpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>