## 2 Materials and Methods
### Feature Selection Based on mRMR Technique  
In large-scale power systems, too many input features of the SVM model will cause a heavy computational burden, which limits the online applicability of the machine learning model. After briefly comparing the 4 types of input features, further feature selection based on mRMR will be conducted in this section. Figure 6: Simulation curves of the 4 types of features for stable and unstable samples. It is obvious that the transient stability prediction time increases with the increase of the feature size, as shown in Figure 7 (using the IEEE 39-bus system). Therefore, when combining multiple features into the SVM classifier, it is necessary to reduce the number of input features. In the field of information theory, mutual information is always used to measure the degree of correlation between discrete random variables, as shown in Equation (4). \[ \begin{array}{l}I(X;Y)=\sum\limits_{x\in X}\sum\limits_{y\in x_{2}}p(x,y)\log \frac{p(x,y)}{p(x)p(y)},\\ I(X,Y)=I(Y;X)\end{array}  \tag{4}\]  
where \(p(x,y)\) is the joint probability density function of \(X\) and \(Y\); \(x_{1}\), \(x_{2}\), \(p(x)\) and \(p(y)\) are the value spaces and marginal probability density functions of \(X\) and \(Y\), respectively. Unless otherwise specified, the subscript of the logarithm is 2. Mutual information calculation requires the variables are discrete, so it is necessary to discretize the trajectory variables with continuous values first. In order to make the SVM learning model have better fitting performance, the data are normalized to the range of [0,1] in the meantime. As mentioned in Section 2.1.1, trajectory variables are used as input features; each group of input features contains 10-dimensional discrete data. Although each dimension of the data contains certain information, if the mutual information analysis is performed directly on each dimension of the data using Equation (4), the original physical meaning of trajectory variables will be destroyed. Therefore, each series of trajectory variables, namely, the 10-dimensional trajectory data, are regarded as a single group of input features for mutual information calculation, due to the temporal correlation among them. Taking the voltage amplitude of buses as an example, for the bus \(i\) and bus \(j\), the sampled 10-dimensional voltage amplitude data are regarded as two vectors, as shown in Equation (5). \[ \begin{array}{l}busi:V_{i}=\begin{bmatrix}V_{i}(1),\dots,V_{i}(10)\\ busj:V_{j}=\begin{bmatrix}V_{i}(1),\dots,V_{j}(10)\\ \end{bmatrix}\end{array} \end{array} \tag{5}\]  
Thus, a joint probability distribution of the two groups of input features is proposed for mutual information calculation of the time-correlated trajectory data, as shown in Equation (6). \[ \begin{array}{l}I(Vi;Vj)=\sum\limits_{m=1}^{10}\sum\limits_{n=1}^{10}p\Big{(} V_{i}(^{m}),V_{j}(^{n})\Big{)}\log\frac{p\Big{(}V_{i}(^{m}),V_{j}(^{n})\Big{)}}{p \Big{(}V_{i}(^{m}),V_{j}(^{n})\Big{)}},\end{array}  \tag{6}\]  
Based on the definition of mutual information, the feature selection method mRMR [37] is utilized to obtain an optimal feature subset, which has minimum redundancy among the interior features and maximum relevance with the stability result. Figure 7: Prediction time of different dimensional data. For a dataset \(D=\{x_{1},\ldots,x_{N}[y]\}\) with \(N\) groups of input features and the stability label vector \(y\). Assuming that \(S\) is a subset of \(D\), the redundancy of the subset can be calculated as Equation (7). \[V_{s}=\frac{1}{|S|^{2}}\sum_{i,j\in S}I\big{(}x_{i};x_{j}\big{)}, \tag{7}\]  
where \(|S|\) is the number of feature groups contained in the subset \(S\). The correlation between subset \(S\) and target vector \(y\) is calculated as Equation (8). \[W_{s}=\frac{1}{|S|}\sum_{i\in S}I(x_{i};y), \tag{8}\]  
Then, taking Equation (9) as the optimization objective to find the optimal subset of input features, with less redundancy \(V_{S}\) and stronger relevance \(W_{S}\).