## 2 Data Enhancement
### Window Warping and Window Slicing  
Window slicing is a commonly used data augmentation technique in the field of image recognition [37; 38] which randomly selects image patches with fixed size but smaller than the original image as the training set. And it was introduced into time-series signal data augmentation intercepting time slices of specific length from time-series signals and classifying them at the slice level [39]. The size of the slice window is a key parameter in the window slicing. Figure 6 demonstrates the diagram of the window slicing. Here, Figure 6b,c are the corresponding signal slices inside the red and blue boxes in Figure 6a, and the slice lengths are 75% and 87.5% of the original signal, respectively. Figure 6 clearly shows that each slice extracted from the same signal will be assigned the same label as the original signal. Window warping is a unique data augmentation technique for time series signals [31]. This method speeds up or slows down (deceleration or acceleration) the time-series signals in the slice window to achieve the enhancement of time-series data. A schematic diagram of the window warping method is shown in Figure 7. In the example, the slice window length is 400 (10% of the original signal length) and the warping rate \(\sigma\) is 2 and 0.5, respectively. Figure 6: Example of the window slicing. (**a**) is the original signal, (**b**) is the slicing of blue box in (**a**), (**c**) is the slicing of red box in (**a**). The length of the slice window and the warping rate are two parameters that affect the results of the window warping method. The relationship between the length of the timing signal after transformation and the length of the slice and the warping rate is determined. \[N_{new}=\left\{ \begin{array}{ll}N_{ori}+(\sigma-1)\times N&,\,\sigma<1\\ N_{ori}+(N-1)\times\sigma+1&,\,\sigma>1\end{array} \right. \tag{4}\]  
where \(N_{new}\) is the transformed signal length, \(N_{ori}\) is the original signal length, \(N\) is the slice length, and \(\sigma\) is the warping rate. We refer to the transformation process when the warping rate is greater than 1 as deceleration and to the transformation process when the warping rate is less than 1 as acceleration. Acceleration and deceleration also have different effects on the length of the signal: deceleration will increase the length of the signal, while acceleration will decrease it. Window warping generates time series of different lengths, whereas machine learning requires the input data to be of the same size. To solve this problem, we can slice the transformed timing signal to keep it the same length. By combining the window slicing and window warping, we can further increase the number of training samples. In this paper, we first use the window warping method to enhance the timing signal after upsampling, and then use the slice window method to extract fixed-length signal segments. Here, the combination of three pairs of warping window length and warping degree is selected to perform warping operation on the original timing signal. The combination is shown in Table 1.  
The timing signals of different lengths after warping are sliced so that the length of all segments is 4000. For the transformation results correspo \begin{table}
\begin{tabular}{c c c c} \hline \hline Warping window length & 200 & 300 & 500 \\ \hline Warping & 5 & 4 & 3 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The combination of warping window length and warping ratio. Figure 7: Example of the window warping, (**a**) is the original, (**b**) is deceleration, (**c**) is acceleration. combination, the signal with label 1 is sliced once, and the other two types of samples are sliced twice. The total number of samples is as follows:  
\[N_{n3}==3*4638+6*2166+6*1884=38214 \tag{5}\]  
Currently, the numbers of samples of various types in the training set are 13,914, 12,996, and 11,304. The proportion of samples of various types is close to 1:1:1.