## 2 Materials and Methods
### Data Preprocessing
#### 2.4.4 Random Forest Classifier and Accuracy Report  
Several artificial intelligence models can be used to process geospatial data when searching for sites in different environments [34; 59; 60; 61; 62]. The present study aims to detect and map fortified archaeological sites using an integrated method composed of RS data, GIS, field surveys, and a random forest algorithm. The steps of this model followed to classify archaeological sites included categorising the image composite, collecting training data, training the classifier model, and validating the classifier with a separated dataset. We use a selection of 101 archaeological sites linked in Blad Talh's investigation on pre-desert zones as our training (\(n=76\)) and confirmation (\(n=25\)) sets. Notwithstanding the existence of quality problems in Blad Talh's data, we sort out those sites that might be evidently specified and precisely situated in the high-resolution imagery obtainable in GEE. These matched up with large and well-preserved sites. Polygons were drawn in GEE to outline the areas of the designated sites from which pixel values in the image composite could be extracted for algorithm training. The random forest classification algorithm was applied in this study [56; 63; 64]. An RF classifier was chosen for the GEE machine-learning implementation. The RF establishes a number of 128 trees on preliminary training samples, but it takes every split in a tree into consideration. For instance, a new subset of predictors is considered randomly in every split when splitting nodes. In addition, the average of the resulting trees helps to evade overfitting and is therefore more stable and reliable than the other decision tree-based classifiers [63; 65]. Moreover, RF classifiers can handle a small number of training samples, and it is possible to get the number of votes for each class. These are two advantages that are particularly useful for RS-based archaeology with limited land-use and cover information. In the current GEE algorithm, the RF is combined with trees, which is considered a sufficient value to gain perfect results without unnecessarily increasing the computational cost. The probability mode of the RF was set to evaluate, filter, and refine the results to ameliorate the algorithm's detection potential.  
Usually, 75% of the samples are used for the training tree, while the remaining 25% are used for confirmation [63; 65]. Herein, the machine-learning process went through three iterations. The original iteration of the algorithm generated pleasant results in that it had the ability to explicitly categorise known sites used as training data and many potential sites by high RF probability values. However, two additional iterations were necessary to adjust the pixels to higher percentages that did not correspond to archaeological sites. RF classifier analysis is a probability domain in bitmap format, where each value records the probability that a given pixel is a \"vulnerable site.\" The RF probability limit for the site values was determined after careful examination of the test data on high-resolution images, which produced a raster map of the clusters (\"fortified sites\"). A higher threshold resulted in better identification of large, clear sites, but many small pixel clusters corresponding to the small sites covered were lost. Confusion metrics were used to calculate RF accuracy, including the overall accuracy and kappa coefficient. Several researchers demonstrated the perfect application of the GEE platform for training and applied an RF classifier due to its high performance [19; 66].