## 5 Abnormal Data Detection
### Abnormal Data Detection Experiment  
According to the category of exception data, three data sets: DATA_L, DATA_F, DATA_LF, were constructed on the basis of dataset 1, which are defined as the label exception data set, attribute exception data set, label and attribute exception data set, respectively. The duplicate data were removed. Due to label anomaly, BEAM class elements were marked as normal data and other elements were marked as abnormal data to form the data set DATA_L. For attribute exceptions, the proportion of exception data was 10%; that is, for every 10 elements, a random feature of an element was selected and changed to a random floating-point number between 0 and 20, and marked as exception data to form data set DATA_F. The dataset DATA_LF was formed by merging the datasets DATA_L and DATA_F. Due to the particularity of anomaly detection, when partitioning data sets, the ratio between the training set, verification set and test set was no longer 6:2:2, but rather 8:1:1, which was chosen according to the current situation. The specific composition of the three data sets were finally generated as shown in Table 14.  
\begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline normal data & BEAM W-Wide F SweptSoli & False True & 0.261838 & 3 & 0 & 0 & 0 & 0 & Normal \\  & BEAM C-Channe SwptSoli & False True & 0.103896 & 16 & 0 & 0 & 0 & 0 & Abnormal properties \\ \hline  & BEAM W-Wide F SwptSoli & False True & 0.266505 & 3 & 0 & 0 & 1 & 0 & Abnormal properties \\ Abnormal data & BEAM W-Wide F SwptSoli & False True & 0.261838 & 6 & 0 & 0 & 1 & 0 & Abnormal label \\  & BEAM Exit Door MappedR & False True & 0.266505 & 28 & 0 & 0 & 0 & 0 & Abnormal label \\  & BEAM Stair: Steel Brep & False True & 0.261838 & 95 & 0 & 0 & 0 & 0 & 0 \\ \hline \hline \end{tabular}
\end{table}
Table 13: Definition of normal and abnormal value.  
Due to the partition proportion and the imbalance between classes, stratified sampling must be adopted in the partitioning of data sets to avoid a situation wherein there are either no abnormal data or excessive abnormal data in the test set, which will subsequently affect the final experimental results. Here, ANN and random forest are used for detecting the abnormal data. The entire procedure of super-parameter optimization is not shown here, and the final experimental results are given in Table 15.  
As can be seen from Table 15, ANN and RF have four indices of 1 in DATA_L, indicating that both methods have excellent performance in the case of label exceptions. In DATA_F, the accuracy of ANN and RF were both above 0.95, the accuracy of ANN was 1 higher than that of RF, and the recall rate of RF was 0.9327 higher than that of ANN. The overall performance of the two methods is comparable, and each has its own advantages. In DATA_LF, the accuracy of RF was two percentage points higher than that of ANN, the accuracy of ANN was slightly higher, and the recall rate of RF was slightly higher. Overall, the performance of the two data sets was lower than the first data set, but the recall rate was able to reach more than 0.91 as a whole (for all the abnormal data). We can detect more than 91%, using the algorithm, showing that the two methods for abnormal data detection have high potential. In the future, if the capacity of the data set can be expanded and the quality of the data set can be further improved, ANN and RF will have a better performance in BIM abnormal data detection.