## 3 Results
### Detection and Classification of LL Fault  
In this study, the genetic algorithm was used to find the best features and the best kernels parameters in SVM classifier for LL fault detection and classification. As mentioned in Section 3.1, two layers have been developed to detect and classify the LL faults in PV arrays. It should be noted that the learning process has been developed in Python software. The main aim of the proposed method is to detect and classify precisely LL faults with lowest selected features. To train and validate these two layers, 1003 samples (433 normal, and 570 LL fault samples) have been recorded as an original dataset, in which all these samples have been used to train and validate the first layers, whereas 570 samples were used to train and validate the second layers. In addition, 180 samples (60 normal, and 120 LL fault samples) have been recorded for the testing of the layers, in which all of these samples were used to test the first layers, whereas 120 samples have been used to test the second layers. The task of the first layer is to identify LL faults. Hence, this layer is a binary classification including two class labels, namely first class (normal events) and second class (LL fault events). Moreover, 802 data samples of the total original dataset are randomly selected for training the first layer, while the remaining samples of the original dataset have been used to validate the layer. The second layer aims to classify LL fault events based on mismatch levels because the main difficulty of the classification process of these faults is while the LL fault has happened under a low mismatch percentage, especially 10% and 20% mismatching. Therefore, this layer is designed as a multiclass classification, so that it includes three class labels, namely first class (10%), second class (20%), and third class (10%). The second class (10%) is the  
has been obtained after five generations. These results illustrate that all kernel functions in both layers are able to escape the local optimum. Moreover, the results have demonstrated that the convergence speed of all kernel functions is appropriate for achieving the optimal solution. To verify the proposed method precisely, these kernel functions with the best-selected parameters and features were evaluated using validation and unseen datasets. The validation and testing results are summarized in Table 5. We have used the confusion matrix to show the performance of these kernel functions. As reported in Table 5, the Gaussian kernel function in both layers has shown that this model is able to detect and classify LL faults under low mismatch levels and high impedances with higher accuracy compared to other kernel functions. \begin{table}
\begin{tabular}{c c c|c c|c c} \hline \hline \multirow{2}{*}{**Layer Type**} & \multirow{2}{*}{**Kernel**} & \multicolumn{3}{c}{**Confusion Matrix**} & \multicolumn{3}{c}{**Accuracy (\%)**} \\  & & **Validation** & **Test** & **Validation** & **Test** \\ \hline \multirow{4}{*}{Fault detection} & Linear & \(\left[\begin{array}{ccc}92&0\\ 2&107\\ 90&2\\ 3&106\\ 92&0\\ 90&109\\ 92&0\\ 8&101\\ \end{array}\right]\) & \(\left[\begin{array}{ccc}60&0\\ 5&115\\ 56&4\\ 4&116\\ 60&0\\ 0&120\\ 24&96\\ \end{array}\right]\) & \(99\) & \(97.22\) \\ \hline \multirow{4}{*}{Fault classification} & Linear & \(\left[\begin{array}{ccc}23&0&0\\ 2&17&0\\ 0&0&72\\ 2&12&0\\ \end{array}\right]\) & \(\left[\begin{array}{ccc}24&0&0\\ 1&23&0\\ 2&70\\ 23&1&0\\ 0&24&0\\ 0&12&60\\ \end{array}\right]\) & \(98.24\) & \(97.5\) \\  & Polynomial & \(\left[\begin{array}{ccc}21&2&0\\ 0&19&0\\ 0&9&63\\ \end{array}\right]\) & \(\left[\begin{array}{ccc}23&1&0\\ 0&24&0\\ 0&12&60\\ \end{array}\right]\) & \(90.35\) & \(89.16\) \\  & Gaussian & \(\left[\begin{array}{ccc}22&1&0\\ 0&19&0\\ 0&0&72\\ 2&17&0\\ 0&3&69\\ \end{array}\right]\) & \(\left[\begin{array}{ccc}24&0&0\\ 0&24&0\\ 0&24&0\\ 0&72\\ 3&21&0\\ 0&7&65\\ \end{array}\right]\) & \(99.12\) & \(100\) \\ \hline \hline \end{tabular}
\end{table}