# A Crack Characterization Method for Reinforced Concrete Beams Using an Acoustic Emission Technique
## 5 Results Analysis
### Classification Using k-NN  
To classify the damage stages, we used the k-NN algorithm. First, we used the classification model with chosen feature vectors that enable the classifier to distinguish the normal condition, micro-cracks, and macro-cracks/fractures. Figure 13 presents the 3D feature space of the selected features that were used in this study. It is clearly visible that clusters for the normal and crack conditions formed. We initially followed the typical process of training the classifier with the chosen feature space but ended up having a low classification accuracy. However, crack characterization and detection for RC structures is a critical task that should have a margin of error that is as low as possible. Any miscalculation may lead to catastrophic outcomes that can cost valuable human lives. To increase our accuracy, we used the CAI plot obtained using the BMS (Figure 12) that clearly indicated the damage to perform the classification. The CAI curve contains all the fault information from the crucial features and has a nice increasing monotonous curve representing the crack formation and expansion over the time history.  
As mentioned in Section 3.5, it is quite important to carefully choose the values of \(k\) for the k-NN algorithm. We conducted experiments with eight different values of \(k\) (1, 3, 5, 7, 9, 11, 13, and 15). From Figure 14, we can see that for \(k\)-values of 5, 3, and 1, the testing accuracy was the highest. The accuracy remained unchanged for these three values. We set the \(k\)-value of our classification problem to be 5.  
Figure 14: Determining the optimal value of \(k\).  
Figure 13: 3D plot of the feature space.  
We divided our datasets into two parts. Seventy percent of the data was used for training and the rest for testing. The first dataset consisted of the direct feature values (rise time, decay time, and AE counts), and the second dataset consisted of the points derived from the CAI plot. Figure 15 presents the confusion matrix for the proposed approach (k-NN and CAI plot) and k-NN algorithm learning directly from the feature space (k-NN and selected AE features). It is clearly visible from Figure 15b that the direct k-NN classifier misclassified many normal data points as micro-cracks. Additionally, for the typical approach, many micro-crack specimens were classified as macro-cracks/fractures. However, from Figure 15a, we can comprehend that the CAI-based classifier successfully distinguished between micro and macro-cracks with a very low error margin. We also compared our proposed method with a very recently published paper [34] that used the CFAR algorithm with k-NN. For comparison, we used two parameters: the average classification accuracy and F1-score. The F1-score can be calculated as follows:  
\[F1-score=2\times\frac{\textit{Recall}\times\textit{Precision}}{\textit{Recall}+ \textit{Precision}} \tag{14}\]  
Table 2 presents the performance comparison for the proposed method, the k-NN algorithm with the direct AE feature vectors, and the work presented in [34]. The proposed method outperforms the other two methods in both of the considered parameters with a good margin.  
Figure 15: Confusion matrix: (**a**) k-NN and CAI plot and (**b**) k-NN and selected AE features.