## 2 Background Theory
### Gramian Angular Field  
Typically, we present the time series in a Cartesian coordinate system, with the vertical axis representing the related real values and the horizontal axis representing the timestamp. In order to reduce information loss, we create a bidirectional mapping between the one-dimensional time series and the two-dimensional space, as proposed by [PERSON] et al. [25], to replace the traditional Cartesian coordinate system with a polar coordinate system. Given a time series with actual observations \(X=(x_{1},x_{2},\ldots,x_{n})\), time series \(X\) is first normalized into the interval \(\left[\frac{1}{2},1\right]\):  
\[\widetilde{x}_{i}=\frac{1}{2}\times\frac{x_{i}-\min(X)}{\max(X)-\min(X)}+\frac {1}{2} \tag{1}\]  
Then, we present the normalized time series in the polar coordinate system using the following mathematical formula, encoding the values of the time series as angles in polar coordinates and the time stamps as polar radii in the polar coordinate system:  
\[\theta_{i}=\arccos\left(\widetilde{x}_{i}\right),\ \frac{1}{2}\leq\widetilde{x}_{i} \leq 1,\ \widetilde{x}_{i}\in\widetilde{X} \tag{2}\]  
\[r_{i}=\frac{t_{i}}{N},\ t_{i}\in N \tag{3}\]  
where \(t_{i}\) represents the time stamp of the time series, and \(N\) is a constant factor used to standardize the range of the polar coordinate system. The mapping transformation (2), (3) will only provide one result in the polar coordinate system. Differing from other methods of converting time series to images, this mapping transformation has a uniquely accurate inverse mapping and, unlike the Cartesian coordinate system, the polar coordinate system preserves the absolute time relationship of the time series.  
When we deflate the time series to the interval \(\left[\frac{1}{2},1\right]\), the corresponding inverse cosine function values will fall in the interval \(\left[0,\frac{\pi}{3}\right]\). After converting the time series to a polar coordinate system, this article will identify the temporal correlation at different time intervals by considering the angular sum between each point. The Gram summation angular field (GASF) is defined as follows:  
\[GASF_{ij}=\cos(\theta_{i}+\theta_{i}) \tag{4}\]  
From the time series \(X\), the corresponding Gram matrix can be obtained by Gram-summing the angular field, and the elements in the Gram matrix \(G(X)\) are obtained via Equation (4):  
\[G(x_{1},x_{2},\ldots,x_{n})=\begin{pmatrix}G_{11}&\ldots&G_{1n}\\ \ldots&\ldots&\ldots\\ G_{n1}&\ldots&G_{nn}\end{pmatrix} \tag{5}\]  
where \(G(X)\) contains the time dependency, which increases successively from the upper left of the matrix to the lower right corners. \(G_{ij}\) indicates the relative correlation for the time series with point \(i\) and point \(j\), and the elements of the diagonal \(G_{ii}\) contain the angular information corresponding to the original values of the time series. Meanwhile, the actual values of the original time series can be reconstructed from the principal diagonal values of the matrix by using an inverse transformation. The length of the time series to be converted determines the size of the transformed Gram matrix, as is shown in Figure 1, and from there we can determine the size of the converted image. The image training set used in this study was set to be 64 \(\times\) 64 pixels in size.