# Data-Driven Prediction Method for Power Grid State Subjected to Heavy-Rain Hazards
## 6 Results
This is realized by penalizing the advantages of the majority class for the separating boundary while maximizing the marginal distance. Increasing misclassification costs can have the effect of moving the separating boundary away from the minority class. According to the misclassification cost, a biased separating boundary can be obtained. Therefore, the G-mean value, where the true positive rate and true negative rate are similar, is an appropriate result. The G-mean value for a misclassification cost of 11 was calculated as the maximum and it also has the highest true positive rate and true negative rate in the grid search range. Consequently, the highest G-mean value was recorded as 0.7188 with a misclassification cost of 11. Figure 5: G-mean values vs. cost values. \begin{table}
\begin{tabular}{c c} \hline \hline
**Variables** & **G-mean** \\ \hline \(x_{1},x_{7}\) & 0.64689 \\ \(x_{1},x_{3},x_{7}\) & 0.67963 \\ \(x_{1},x_{2},x_{3},x_{7}\) & 0.69427 \\ \(x_{1},x_{2},x_{3},x_{7},x_{9}\) & 0.70572 \\ \(x_{1},x_{2},x_{3},x_{6},x_{7},x_{9}\) & 0.55672 \\ \(x_{1},x_{2},x_{3},x_{4},x_{6},x_{7},x_{9}\) & 0.60430 \\ \(x_{1},x_{2},x_{3},x_{4},x_{6},x_{7},x_{9},x_{10}\) & 0.43253 \\ \(x_{1},x_{2},x_{3},x_{4},x_{6},x_{7},x_{8},x_{9},x_{10}\) & 0.49495 \\ \(x_{1},x_{2},x_{3},x_{4},x_{5},x_{6},x_{7},x_{8},x_{9},x_{10}\) & 0.56860 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: G-mean value with a combination of variables. This is superior to the best model shown in Table 3. Therefore, this study used the SVM model with a cost of 11 to demonstrate the overall model performance. Table 4 shows the confusion matrix of the SVM models, with the variables \(x_{1},x_{2},x_{3},x_{7},x_{9}\) and cost of 11 and Table 5 shows the SVM models' performance. The other typical classification models (SVM with the linear and polynomial kernel, multilayer perceptron, decision tree, random forecast, logistic regression) were also trained and tested in the same fashion (i.e., their hyperparameters with misclassification cost were searched and selected to obtain the best performance). The results show that the normal state prediction accuracy was 70.93%, the outage prediction accuracy was 72.83%, and the SVM with RBF had an overall prediction accuracy with a G-mean of 0.7188. Whereas, the random forest can classify with a G-mean of 0.7000, which is the most superior model except for SVM. The results indicate that the obtained decision boundary using the cost-sensitive SVM could be used to adequately predict the grid state for future heavy-rain events. Predicted results are shown based on administrative areas since the branch office areas are close to the administrative areas and it is a convenient method of displaying the spatial distribution of the results. In order to show the spatial distribution of the proposed method, it was used to predict a new heavy-rain event in October 2016. Figure 6 shows the study area. The actual heavy-rain event lasted 15 h; however, for simplicity, the prediction results show only the final nine hours of heavy rain. Figure 7 shows the spatial distribution of the actual and predicted grid state. The black boundary represents the no heavy-rain event for administrative areas and the red and white boundaries represent the outage and normal grid state, respectively. As shown in Figure 7, the proposed method demonstrated adequate prediction performance, however, it does not represent a perfect classifier. This may be due to a significant number of normal grid states mispredicted as outage grid states. \begin{table}
\begin{tabular}{c c c} \hline  & **Predicted Normal** & **Predicted Outage** \\ \hline Actual Normal & 1945 & 797 \\ Actual Outage & 72 & 193 \\ \hline \end{tabular}
\end{table} 
Table 4: Confusion matrix of the proposed SVM model.