## 2 Materials and Methods
### Feature Extraction and Sorting  
Given that CRA is characterized by heartbeats with varying degrees of fluctuation, we focused on the standard deviation (SD) (i.e., degree of change) of selected features among multiple beats. Based on the physiological significance of the aforementioned Ca2+-related subcellular parameters in Section 2.3, we extracted features as the SDs of the maximum systole (wave crest), end-diastole (wave trough), and the variation between the maximum systole and end-diastole (crest-trough) of [Ca2+]i and [Ca2+]jsr among all simulated beats  
Figure 3: The virtual lead II ECG of the ventricular model under cycle lengths of (**a**) 600 ms and (**b**) 330 ms.  
under alternans and non-alternans. Moreover, the SDs of the maximum opening (wave crest) of the d-gate, the maximum closing (wave trough) of the ff-gate, and the gated channel opening time (GCOT) among all beats were also considered. Wave crests and troughs were identified by the 'findpeaks' function in MATLAB. All features underwent a homogeneity of variance test (Levene test) and a normality test (Shapiro-Wilk test), which can be expressed by Equations (3) and (4), respectively:  
\[W_{L}=\frac{(N-k)}{(k-1)}\frac{\sum_{i=1}^{k}N_{i}\big{(}\overline{Z_{i.}}- \overline{Z_{.}}\big{)}^{2}}{\sum_{i=1}^{k}\sum_{j=1}^{N_{i}}\big{(}Z_{ij}- \overline{Z_{i.}}\big{)}^{2}} \tag{3}\]  
where \(N\) is the total number of features (\(N=18\) in our research) under groups of alternans and non-alternans. \(k\) is the number of different groups (\(k=2\)) and \(N_{i}\) is the number of features in different groups (\(N_{i}=9\) for each group). \(Z_{ij}\) is a transform of the original data \(Y_{ij}\), which is the absolute value of the subtraction of \(Y_{ij}\) from the mean of the \(i^{\text{th}}\) feature \(\overline{Y_{i.}}\). \(\overline{Z_{i. }}\) is the group mean of \(Z_{ij}\) and \(\overline{Z_{. }}\) is the mean of all data in \(Z_{ij}\). \[W_{s}=\frac{(\sum_{i=1}^{m}a_{i}x_{i})^{2}}{\sum_{i=1}^{m}(x_{i}-\overline{x}) ^{2}} \tag{4}\]  
where \(a\) is the tabulated coefficient, \(m\) is the number of features, \(x_{i}\) is the dataset of feature values in increasing order, and \(\overline{x}\) is the mean of the dataset. All features were found to be non-normally distributed. Afterward, the Wilcoxon rank-sum test was performed to determine if each feature with and without alternans is of statistical significance. The statistic of such a test is given by the smaller of the two following equations:  
\[U_{1}=N_{A}N_{B}+\frac{N_{A}(N_{A}+1)}{2}-R_{A} \tag{5}\]  
\[U_{2}=N_{A}N_{B}+\frac{N_{B}(N_{B}+1)}{2}-R_{B} \tag{6}\]  
where \(A\) and \(B\) denote the group of feature values under alternans and non-alternans, respectively. \(N_{i}\) (\(i=A\), \(B\)) is the number of features in dataset \(A\) or \(B\), and \(R_{i}\) (\(i=A\), \(B\)) is the rank sum of elements in the two groups. Then, the \(z\) -value was calculated by:  
\[z=\frac{\min(U_{1},U_{2})-(N_{A}N_{B})/2}{\sqrt{N_{A}N_{B}(N_{A}+N_{B}+1)/(N_{ A}+N_{B})}} \tag{7}\]  
In the current case, the \(p\)-values corresponding to the \(z\) -values for all features were less than 0.001, indicating that all the extracted features were statistically significant. As the filter method balances computational cost, classification speed, and data overfitting, seven algorithms belonging to this method, including the variance threshold, the chi-square test, the correlation-based feature selector (CFS) [28], mutual information-based (MIB) importance interpretation, the Fisher score [29], relief [30], and Minimum-Redundancy-Maximum-Relevance (MRMR) [31], were incorporated to implement feature selection. The first three algorithms were used to discriminate whether a feature mainly influenced CRA generation, assigning weights of 1 and 3 to features within and without the class, respectively. The explicit sorting of features was accomplished using the latter four algorithms, which assigned preset weights from 1 to 9 to the nine selected features based on their importance.