# Evaluation of Artificial Intelligence-Based Models for Classifying Defective Photovoltaic Cells
## 3 Results and Discussion
### Convergence and Results of the Models  
An important aspect when working with AI is the convergence of the model. Next, Figure 7 shows the behavior of the hit obtained with each of the classifiers, depending on the number of iterations performed. In the case of _MLP_, 50,000 iterations were not reached due to the high computational cost, although there was no loss of efficiency, as was well observed in all models since there was some convergence at a lower number of iterations. In the _CNN_ model compilation appeared a critical problem. The amount of time needed to finish one iteration was extremely high. This was vital in order to decide the number of iterations. The authors finally decided to use 100 iterations of 1000 epochs. With this number of iterations, some convergence was obtained. From the results shown in Figure 7, the most successful model from the first fourth classifiers _(KNN, SVM, RF, and MLP)_ was _SVM_, closely followed by _MLP_ and _RF_. The worst result was obtained by _KNN_; however, the success rate was 70.61%, and it was possible to consider it as being of high value. On the other hand, it could be seen that the fifth classifier, _CNN_, achieved higher success than the rest, exceeding 80%. Table 2 shows the results (percentage of success) of the five models used once the cells used for the validation phase were classified. The time (hours) required are also shown. With regard to time, the first column of times shows the time needed to locate the ideal parameters (_hyperparameter tuning_), while the second column of times indicates the time needed for classifier training. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & _KNN Success_ & _SVM Success_ & \begin{tabular}{c} _KNN + SVM_ \\ **Success Group 3** \\ \end{tabular} & \begin{tabular}{c} _KNN Success_ \\ **Group 3** \\ \end{tabular} & \begin{tabular}{c} _SVM Success_ \\ **Group 3** \\ \end{tabular} & **Variables** \\ \hline \begin{tabular}{c} **Top 1 KNN** \\ **success** \\ **stop 1 KNN** \\ **success** \\ **stop 3** \\ \end{tabular} & 0.745 & 0.756 & 1.425 & 0.734 & 0.691 & 2, 4, 5, 7, 10, 13, \\ \begin{tabular}{c} **Top 1 SVM** \\ **success** \\ **stop 1 KNN +** \\ **group 3** \\ **stop 1 KNN** \\ **success group 3** \\ **stop 1 KNN** \\ **success group 3** \\ **stop 1 KNN** \\ **success group 3** \\ \end{tabular} & 0.7077 & 0.7628 & 1.5973 & 0.6975 & 0.8998 & 4, 5, 8, 10, 13, 17, \\ \begin{tabular}{c} **Top 1 KNN +** \\ **group 3** \\ **success group 3** \\ **success group 3** \\ **stop 3** \\ \end{tabular} & 0.7005 & 0.7187 & 1.7646 & 0.9093 & 0.8552 & 2, 4, 6, 8, 10, 20, 23, and 24 \\ \begin{tabular}{c} **Top 1 KNN** \\ **success group 3** \\ **success group 3** \\ **success group 3** \\ **stop 3** \\ \end{tabular} & 0.7095 & 0.7187 & 1.7646 & 0.9093 & 0.8552 & 2, 4, 6, 8, 10, 20, 23, and 24 \\ \
\begin{tabular}{c} **Top 1 KNN** \\ **success group 3** \\ **success group 3** \\ **stop 3** \\ \end{tabular} & 0.7095 & 0.7187 & 1.7646 & 0.9093 & 0.8552 & 2, 4, 5, 7, 8, 9, 10, 23, and 24 \\
\begin{tabular}{c} **Top 1 KVM** \\ **success group 3** \\ **success group 3** \\ \end{tabular} & 0.7099 & 0.7401 & 1.6371 & 0.704 & 0.9331 & 12, 15, 16, 17, 18, 19, 20, and 21 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Relationship between success in classification and variables used. Regarding the time spent in locating the main parameters, the fastest model was _KNN_, with _SVM_ following and with a time close to 1 h, _MLP_. _RF_ presented the worst time to locate these parameters, requiring more than 2 h.  
Regarding the time spent on training, _SVM_ was the fastest, closely followed by _KNN_. At the other extreme, _RF_ required almost 9 h, followed by _MLP_ with 15.54 h, and _CNN_ with 100 h.  
Observing results presented in Table 2, it could be concluded that _CNN_ presented the highest percentage of success, with 81.6% but was also extremely slow (around 100 h).