## 4 Machine Learning Algorithms
### Random Forest Algorithm Development
#### 4.1.1 Classification Algorithm  
The data set includes nine attribute types involved in the process. These attributes serve various functions in the algorithm, some of which are Features, data that can be input as real numbers from NDE technology measurements on site; some are Meta, data that cannot be measured as real numbers by NDE technologies; and the rest are referred to as Targets, as described below:  
1. Degree of Saturation: the attribute is a _Numerical_ variable that has a _Feature_ role. 2. Length of Corrosion: the attribute is a _Numerical_ variable that has a _Meta_ role. 3. Delamination Depth: the attribute is a _Numerical_ variable that has a _Feature_ role. 4. Concrete Cover: the attribute is a _Numerical_ data variable that has a _Feature_ role. 5. Delamination M.C: the attribute is a _Categorical_ variable that has a _Meta_ role. 6. Measured Resistivity: the attribute is a _Numerical_ variable that has a _Feature_ role. 7. Measured HCP: the attribute is a _Numerical_ variable that has a _Feature_ role. 8. Actual Resistivity: the attribute is a _Categorical_ variable that has a _Target_ role. 9. Actual HCP: the attribute is a _Categorical_ variable that has a _Target_ role. It is worth noting that the attribute \"Degree of Saturation\" can be observed using various methods like moisture sensors, gravimetric measurements, or electrical impedance techniques. These measurements help in assessing the moisture level within the material. On the other hand, the delamination in the attribute \"Delamination Depth\" refers to the separation or detachment of layers within the concrete. Observing the delamination depth typically involves NDE techniques like impact echo (IE) or ultrasonic pulse echo (UPE) testing. \"Concrete Cover\" refers to the thickness of the concrete layer that covers and protects the steel reinforcement within a structure. It can be measured using techniques like ground penetrating radar (GPR) or cover meters. The targets considered are both the Actual Resistivity and Actual HCP, which will be predicted by the classification algorithm as discrete classification values rather than continuous values. The choice of discrete classification values for the ER method is based on the correlation between resistivity and corrosion risk [28], while for the HCP method,the choice is based on the link between potential measurements and the active corrosion probability [29]. The classification values for the HCP and ER are as follows:  
Predicted values (Target) for HCP = {No Corrosion, Transition, Corrosion}. Predicted values (Target) for ER = {Negligible, Weak, Moderate, High}. The algorithm workflow for the HCP and ER technologies is shown in Figure 11.  
The algorithm demonstrates exceptional precision in predicting both Actual ER classification and Actual HCP classifications. On average, across classes, the algorithm's accuracy was 92.6% for ER and 85.9% for the HCP. However, the accuracy varies when the target class is altered, as illustrated in Table 2.  
Additionally, the algorithm's efficiency is tied to other evaluation results that provide a numerical evaluation of its quality, known as a classifier performance measure, including the area under the ROC curve (AUC), F1, precision, and recall. The evaluation results for this algorithm based on the classifier performance measures indicate that the AUC, CA, F1, precision, and recall for the average across classes are 0.989, 0.926, 0.926, 0.927, and 0.926, respectively. Table 3 below displays the evaluation results for the other classes.