# Prediction of Pile Axial Bearing Capacity Using Artificial Neural Network and Random Forest
## 3 Data Collection and Preparation
### Data Preparation  
In order to correctly predict the bearing capacity of piles, a thorough understanding of the factors that affect the bearing capacity of the pile is needed. Most traditional pile bearing capacity determination methods included the following parameters: pile geometry, pile material properties, and soil properties [4; 5]. The depth of the water table was not included in this study, as it is believed that the effect is already accounted in the SPT blow counts [43]. Since the bearing capacity of piles depended on the soil compressibility and the SPT was one of the most commonly used tests in practice (indicating the in situ compressibility of soils), the SPT blow count/300 mm (N) along the embedded length of the pile was used as a measure of soil compressibility. In this study, the average SPT blow count along the pile shaft (N\({}_{\text{s}}\)) and pile tip (N\({}_{\text{t}}\)) were calculated. It is worth mentioning that, in order to obtain the average SPT (N\({}_{\text{t}}\)) value around the pile tip, [PERSON]'s recommendation (1976) [4] was considered. The average SPT (N\({}_{\text{t}}\)) value for 8D above and 3D below the pile tip was obtained, where D represented the pile diameter. Hence, the factors that were used for ML simulation were (Figure 2): (i) pile diameter (D); (ii) length of pile tip segment (L\({}_{1}\)); (iii) length of second pile segment (L\({}_{2}\)); (iv) length of pile top segment (L\({}_{3}\)); (v) the natural ground elevation (E\({}_{\text{g}}\)); (vi) pile top elevation (E\({}_{\text{p}}\)); (vii) guide pile segment stop driving elevation (E\({}_{\text{t}}\)); (viii) pile tip elevation (Z\({}_{\text{m}}\)); (ix) the average SPT blow along the embedded length of the pile (N\({}_{\text{s}}\)) and (x) the average SPT blow at the tip of the pile (N\({}_{\text{t}}\)). The bearing capacity was the single output variable in this study (P\({}_{\text{u}}\)). Due to an important quantity of data (2314 samples), the dataset used in this study is partly presented and summarized in Table 1, along with the statistical information of the input and output variables. As observed in Table 1, the pile diameter (D) ranged from 300 to 400 mm. The length of pile tip section (L\({}_{1}\)) ranged from 3 m to 8.4 m. The length of the second pile segment (L\({}_{2}\)) ranged from  
Figure 1: (**a**) Experimental location; (**b**) pre-cast square-section concrete pile; (**c**) hydraulic pile presses machine; (**d**) experimental layout. 1.47 m to 8 m. The length of pile top segment (L\({}_{3}\)) ranged from 0 m to 3.95 m, where a 0 value means that segment did not exist. The natural ground elevation (E\({}_{\text{g}}\)) varied from \(-1.6\) m to 3.4 m. The pile top elevation (E\({}_{\text{P}}\)) varied from 2.05 m to 4.13 m. The guide piles stop driving elevation (E\({}_{\text{t}}\)) varied from \(-1.6\) m to 8.4m. The pile tip elevation (Z\({}_{\text{m}}\)) varied from 8.27 m to 18.35 m. The average SPT blow counts along the embedded length of the pile (N\({}_{\text{s}}\)) ranged from 5.57 to 19.2. The average SPT blow counts at the tip of the pile (N\({}_{\text{t}}\)) ranged from 4.35 to 8.47. The bearing capacity load (P\({}_{\text{u}}\)), ranged from 384 kN to 1860 kN with a mean value of 1164.5 kN and a standard deviation of 268.6 kN. In this work, the collected dataset was divided into the training and testing datasets. The training part (approximately 70% of the total data) was used to train the ML models, whereas testing data (approximately 30% of the remaining dataset) was used to validate the performance of the ML models. Different from the original data, the training dataset (including 10 inputs and 1 output) was scaled in the [\(-1\); 1] range (Table 2). By considering all variables in a uniform range, bias within the dataset between inputs could be minimized. In the present study, the range [\(-1\); 1] was selected to better capture the non-Gaussian distribution of input variables.