## 2 Basic Principles of Diagnostic Models  
### Gramian Angle Field  
Gram angle field is a mapping method that converts one-dimensional waveforms into two-dimensional images in Cartesian coordinates. After the Gram angle field conversion, the image signal not only contains the dynamic information of the original signal in the discrete time domain, but also preserves the dependence of the original signal on the time series [20,21]. GAF first converts the step size and amplitude in the time sequence into radius and angle through polar projection. Then, the correlation is measured between each point in polar coordinates using trigonometric functions, and a Gram matrix is formed through trigonometric transformation. For the given time series, \(X=\{x_{1},x_{2},\cdots,x_{n}\}\); in order to facilitate subsequent angle calculations, it is first scaled to the \([-1,1]\) interval. The scaled time series \(x_{i}^{\prime}\) is shown below. \[x_{i}^{\prime}=\frac{[(x_{i}-\max X)+(x_{i}-\min X)]}{\max X-\min X} \tag{1}\]Then, map the scaled time series \(x^{\prime}_{i}\) to a polar coordinate system, encoding the numerical values as cosine angles \(\theta\) with a range of [0, \(\pi\)]. Mapping time nodes \(t_{i}\) to radii \(r\) preserves the temporal relationships. The mapping relationship is shown below. \[\theta=\arccos x^{\prime}_{i},-1\leqslant x^{\prime}_{i}\leqslant 1,x^{\prime}_{i }\in X^{\prime} \tag{2}\]  
\[r=\frac{t_{i}}{N},t_{i}\in N \tag{3}\]  
where \(t_{i}\) is the time node and \(N\) is the total number of time nodes. Within the interval \(\theta\in[0,\ \pi]\), \(\cos\theta\) monotonically decreases, so for a given time series, there is a unique corresponding result in polar coordinates. In addition, by using the polar coordinate radius, the absolute time relationship is also ensured, which belongs to bijective transformation. After mapping the time series to polar coordinates, the correlation can be calculated based on the relationship between the angle sum or angle difference between each point using two encoding methods: Gram Angular Summation Field (GASF) and Gram Angular Difference Field (GADF). The calculation formulas for GASF and GADF are as follows. \[\text{GASF}= \begin{bmatrix}\cos(\theta_{1}+\theta_{1})&\cos(\theta_{1}+\theta _{2})&\cdots&\cos(\theta_{1}+\theta_{n})\\ \cos(\theta_{2}+\theta_{1})&\cos(\theta_{2}+\theta_{2})&\cdots&\cos(\theta_ {2}+\theta_{n})\\ \vdots&\vdots&&\vdots\\ \cos(\theta_{n}+\theta_{1})&\cos(\theta_{n}+\theta_{2})&\cdots&\cos(\theta_ {n}+\theta_{n})\end{bmatrix} =\widetilde{X}^{\prime}\cdot\widetilde{X}-\sqrt{ I-\widetilde{X}^{2}}\cdot\sqrt{I-\widetilde{X}^{2}} \tag{4}\]  
\[\text{GADF}= \begin{bmatrix}\sin(\theta_{1}-\theta_{1})&\sin(\theta_{1}-\theta _{2})&\cdots&\sin(\theta_{1}-\theta_{n})\\ \sin(\theta_{2}-\theta_{1})&\sin(\theta_{2}-\theta_{2})&\cdots&\sin(\theta_ {2}-\theta_{n})\\ \vdots&\vdots&&\vdots\\ \sin(\theta_{n}-\theta_{1})&\sin(\theta_{n}-\theta_{2})&\cdots&\sin(\theta_ {n}-\theta_{n})\end{bmatrix} =\sqrt{I-\widetilde{X}^{2\prime}}\cdot\widetilde{ X}-\widetilde{X}^{\prime}\cdot\sqrt{I-\widetilde{X}^{2}} \tag{5}\]  
where \(I\) is the unit row vector, \(\widetilde{X}\) is the scaled time series, and \(\widetilde{X}^{\prime}\) is the transpose of \(\widetilde{X}\). After the above transformation, the given time series can be transformed into a two-dimensional matrix that is symmetric along the diagonal, while preserving the integrity and time-dependent characteristics of the time series. The GAF encoding process is shown in Figure 1.  
Figure 1: GAF coding schematic diagram. In summary, the generation process of Gram angle field usually includes the following steps:  
1. Data preprocessing: Normalize the input one-dimensional time-series data to ensure that its values are within an appropriate range. 2. Polar coding: Map each time-series value to an angle in a polar coordinate system. This typically involves converting time-series values into offsets relative to a reference value (such as maximum or minimum) and calculating the corresponding angle. 3.