# A Boundary Distance-Based Symbolic Aggregate Approximation Method for Time Series Data
## 2 Related Work
### An Improvement of SAX Distance Measure for Time Series  
As the first to symbolize time series and can be effectively applied to time series classification, SAX has been recognized by many experts and scholars, however the shortcoming is also obviously to see. The larger w and smaller \(\alpha\), the more features will be lost for time series. To keep as much important information as possible, time series trend needed to be kept in the process of SAX dimensionality reduction. For example, in reference [26], some limitations of using SAX algorithm on the classification for time series were discussed. In this paper, these cases are listed separately in Figure 2.  
In Figure 2, the average value of a and d, b and e, c, and f correspond to the same, but it is very clear that their time series tend to be significantly different. In order to correctly describe this difference, the author proposes using the SAX-TD method. According to the calculation rules of SAX-TD, the trend distance td (q, c) of two time series q and c is first calculated. The specific definition is as follows:  
\[\mathrm{td(q,c)}=\sqrt{\left(\Delta q(t_{s})-\Delta q(c_{s})\right)^{2}+\left( \Delta q(t_{e})-\Delta q(c_{e})\right)^{2}} \tag{4}\]  
where \(t_{s}\) and \(t_{e}\) are the start point and end point of a time segment for the time series q and c. Respectively, the specific definition of \(\Delta q(t)\) is as follows:  
\[\Delta q(t)=q(t)-\overline{q} \tag{5}\]  
\(\Delta c(t)\) will be calculated in the same way, in article the author refers to this method as the tendency of time segments.  
With the SAX method description, the time series Q and C respectively represented as follows:  
\[\mathrm{Q}:\ \Delta q(1)\dot{q_{1}}\ \Delta q(2)\dot{q_{2}}\ \ldots\ \Delta q(w) \dot{q_{w}}\Delta q(w+1)\]  
\[\mathrm{C}:\Delta c(1)\dot{\mathrm{C}}\ \Delta c(2)\dot{\mathrm{C}}\ \ldots\ \Delta c(w) \dot{c_{w}}\Delta c(w+1)\]  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline \(\beta_{i}\) & **3** & **2** & **5** & **6** & **7** & **8** & **9** & **10** \\ \hline \(\beta_{1}\) & \(-0.43\) & \(-0.67\) & \(-0.84\) & \(-0.97\) & \(-1.07\) & \(-1.15\) & \(-1.22\) & \(-1.28\) \\ \(\beta_{2}\) & \(-0.43\) & \(0\) & \(-0.25\) & \(-0.43\) & \(-0.57\) & \(-0.67\) & \(-0.76\) & \(-0.84\) \\ \(\beta_{3}\) & & & \(0.67\) & \(0.25\) & \(0\) & \(-0.18\) & \(-0.32\) & \(-0.43\) & \(-0.52\) \\ \(\beta_{4}\) & & & & \(0.84\) & \(0.43\) & \(0.18\) & \(0\) & \(-0.14\) & \(-0.25\) \\ \(\beta_{5}\) & & & & \(0.97\) & \(0.57\) & \(0.32\) & \(0.14\) & \(0\) \\ \(\beta_{6}\) & & & & & \(1.07\) & \(0.67\) & \(0.43\) & \(0.25\) \\ \(\beta_{7}\) & & & & & & \(1.15\) & \(0.76\) & \(0.52\) \\ \(\beta_{8}\) & & & & & & & \(1.22\) & \(0.84\) \\ \(\beta_{9}\) & & & & & & & & \(1.28\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: A lookup table for breakpoints with the alphabet size from 3 to 10.  
Figure 2: Several typical segments with the same average value but different trends [26]. Segment a and d, b and e, c and f are in opposite directions while all in same mean value.  
\(\hat{q}_{1},\hat{q}_{2}\dots\hat{q}_{w}\) is a sequence symbolized by SAX, \(\Delta q(1),\ \Delta q(2)\,\dots,\Delta q(w)\) are the trend variations, and \(\Delta q(W+1)\) is the change of the last point.  
The distance between two time series can be defined based on the trend distance as follows:  
\[TDIST\Big{(}\hat{Q},\hat{C}\Big{)}=\sqrt{\frac{n}{w}}\sqrt{\sum_{i=1}^{w}((dist( \hat{q}_{i},\hat{c}_{i}))^{2}+\frac{w}{n}(td(q_{i},c_{i}))^{2}} \tag{6}\]  
where \(\hat{Q}\) and \(\hat{C}\), respectively, denote the time series Q and C, \(n\) is the length of Q and C, and w is the number of time segments. The distance between time series Q and C can be calculated by Equation (6). In this paper, the author proved that this method has a low bound to Euclidean distance, and the experimental results also showed that this method improves classification accuracy compared with ESAX.