## 3 Results
Figure 11: Barplot of 5-fold CV for different ensemble classifiers based on the (**a**) accuracy, (**b**) recall, (**c**) precision, and (**d**) F1 measure. \begin{table}
\begin{tabular}{c c c c c} \hline  & **PCA** & **LDA** & **ICA** & **UMAP** \\ \hline Fold\_1 & 0.704225 & 0.809523 & 0.824175 & 0.511728 \\ Fold\_2 & 0.685393 & 0.843373 & 0.935897 & 0.584415 \\ Fold\_3 & 0.746268 & 0.788306 & 0.880597 & 0.632352 \\ Fold\_4 & 0.647058 & 0.741935 & 0.835294 & 0.638554 \\ Fold\_5 & 0.643678 & 0.809523 & 0.851851 & 0.547619 \\ \hline Average & 0.685324 & 0.798649 & 0.865563 & 0.582810 \\ \hline \end{tabular}
\end{table} 
Table 4: Precision of the GB model using various dimensionality reduction techniques including PCA, LDA, ICA, and UMAP. \begin{table}
\begin{tabular}{c c c c c} \hline  & **PCA** & **LDA** & **ICA** & **UMAP** \\ \hline Fold\_1 & 0.739130 & 0.543478 & 0.815217 & 0.528541 \\ Fold\_2 & 0.760869 & 0.663043 & 0.793478 & 0.489130 \\ Fold\_3 & 0.771739 & 0.543478 & 0.641304 & 0.467391 \\ Fold\_4 & 0.752961 & 0.597826 & 0.771739 & 0.576086 \\ Fold\_5 & 0.739130 & 0.608695 & 0.758061 & 0.535028 \\ \hline Average & 0.752173 & 0.591304 & 0.754347 & 0.506521 \\ \hline \end{tabular}
\end{table} 
Table 3: Recall of the GB model using various dimensionality reduction techniques including PCA, LDA, ICA, and UMAP. Figure 12: Evaluation results for the four metrics including accuracy, recall, precision, and F1-measure for different ensemble classifiers. \begin{table}
\begin{tabular}{c c c c c} \hline  & **PCA** & **LDA** & **ICA** & **UMAP** \\ \hline Fold\_1 & 0.802173 & 0.872826 & 0.905434 & 0.726086 \\ Fold\_2 & 0.810869 & 0.891304 & 0.929347 & 0.735869 \\ Fold\_3 & 0.803261 & 0.875435 & 0.898913 & 0.727173 \\ Fold\_4 & 0.797826 & 0.859782 & 0.905434 & 0.713043 \\ Fold\_5 & 0.822826 & 0.885869 & 0.928267 & 0.759782 \\ \hline Average & 0.807391 & 0.876956 & 0.913478 & 0.732391 \\ \hline \end{tabular}
\end{table} 
Table 2: Accuracy of the GB model using various dimensionality reduction techniques including PCA, LDA, ICA, and UMAP. According to the results depicted in the tables, ICA outperformed the other methods in terms of enhancing the GB model's accuracy. The high performance of the GB classifier with ICA suggests that this combination expertly captured the underlying structure of the ultrasonic signals. Implementation  
Deploying the model on an MCU enables real-time fault detection, reducing the need for manual inspections and minimizing downtime. In this section, two approaches for MCU deployment are investigated: direct classification based on calculated features, and an alternative approach utilizing a dimensionality reduction method as the input to the classifier, as illustrated in Figure 13.  
The ICA method exhibiting a higher accuracy (based on Tables 2-5) was selected for implementation of the second approach. ICA was computed using the FastICA function and then the 'components' and'mixing' matrices were extracted and converted to C array format using the skit-learn library in Python. The models were deployed on a 64 MHz ARM Cortex-M4F MCU. An LA104 Logic Analyzer with 4 channels and a sampling rate of up to 100 MSa/s along with Saleae Logic software were employed for the timing measurements. The first approach, with feature computation on the MCU, took 9.48 ms, while the second approach, with ICA computation on the MCU, took 315.44 ms. Both included 6.54 ms for data sampling and differed in their computation and prediction times, as shown in Figures 14 and 15. The first method was faster with a higher accuracy (94.2% compared to the second method with 91.35%) for our dataset, but the second method had more adaptability for diverse types of data due to the use of the ICA dimensionality reduction model. The choice of approach can vary based on the user's criteria. Additionally, using ICA before the GB model can lead to better noise reduction and feature extraction, improving the robustness of the classifier in varying conditions.