## 4 Classification and Results
### R-Classification  
In the present study, supervised machine learning algorithms were employed for detecting the damage location, i.e., the R-Classification. Two different feature vectors were evaluated, derived from selected features obtained from sensors 2 and 3, and features belonging to sensors 4 and 5 (refer to Tables 4 and 5, respectively). The Classification Learner application available in MATLAB(r) was used for this sake. The dataset was partitioned such that 85% was allocated to the training phase and the remaining 15% to the testing phase. Importantly, these two sets were randomly selected from the specified feature vectors before entering the application environment. As a starting point, all available classification algorithms in the eight families, i.e., decision trees, discriminant analysis, Support Vector Machines, nearest neighbor, kernel approximation, ensemble, neural network, and Naive Bayes classifiers, were trained on the feature vector belonging to sensors 2 and 3. Upon comparing the validation accuracies, it was found that the \"Bagged Trees\" belonging to the ensemble family exhibited the highest performance, e.g., 92.9%. The next step was to implement an optimization scheme for this family using \"Bayesian optimization\" as the optimizer, \"expected improvement per second plus\" as the acquisition function with 200 iterations, and \"decision tree\" as the learner type to find the tuned hyperparameters. Figure 14 shows the performance of the optimization procedure in terms of minimum classification error versus the number of optimizer iterations. The Best point hyperparameter (the red square in the figure) was reached after 33 iterations when the ensemble method was set to \"Bag\". The observed minimum classification error, the number of learners, the maximum number of splits, and the number of predictors to sample were, in that order, 0.0368, 366, 134, and 3. Figure 14: R-Classification: the optimization process for the tuned hyperparameters for the network in the case of S2–S3. Figure 15a,b show the confusion matrices for the training and testing phases, respectively, using the optimized network on the assumption of the sensors pair S2-S3. In the confusion matrices, R-Class 1, R-Class 2, R-Class 3, and R-Class 4 are represented by numbers 0, 1, 2, and 3, respectively. The validation accuracy increased in this instance to 96.32%. Only 5 out of 136 samples were mistakenly classified. Furthermore, the observed accuracy in the testing stage was 95.83%. Additionally, the average F1-score and sensitivity of the testing phase are both 0.958. As depicted in the graphs of Figure 15, out of the 136 samples randomly assigned to the training phase, only 5 were misclassified. Specifically, 1 sample from R-Class 2 was classified as R-Class 3, 2 samples from R-Class 3 were classified as R-Class 4, and just 1 sample from R-Class 3 was classified as R-Class 4. During the testing phase, only 1 sample from R-Class 4 was incorrectly classified as R-Class 3. The process previously outlined was then applied to the feature vector selected from sensors 4 and 5, as specified in Table 5. In the training phase, the initial accuracy was 92.71%, with the \"Bag\" ensemble method exhibiting superior performance. Using the same optimization settings as the previous case, the AdaBoost ensemble method with 488 learners, a learning rate of 0.86794, a maximum of 6 splits, and a minimum classification error of 0.028429 was determined through the tuning procedure. The optimization procedure based on the minimum classification error per number of iterations is illustrated in Figure 16. It is worth mentioning that after 144 iterations, the Best point hyperparameters were explored. The training and testing confusion matrices with accuracy values of 96.32% and 91.67%, respectively, are shown in Figure 17a,b. In the confusion matrices, R-Class 1, R-Class 2, R-Class 3, and R-Class 4 are represented by numbers 0, 1, 2, and 3, respectively.