# Spatial Prediction of Soil Contaminants Using a Hybrid Random Forest-Ordinary Kriging Model
## 3 Results
### RF-OK Model-Based Interpolation  
The residuals, which indicate the differences between the actual sampled values and those predicted by the RF model, were calculated as shown in Figure 9a. These residuals were computed for 40 sampling points and ranged between -30.225 and 283.648 mg/kg. The hyperparameter tuning of the RF prediction residuals was conducted using a grid of options and parameters similar to those employed for the OK technique, with the iterative process focused on achieving the lowest possible RMSE. The optimal options and parameters for applying OK to RF residuals varied from those of the original sampling data. The coordinate type was set to geographic, with 18 n_closest_points, two nlags, and the spherical variogram model while maintaining a weight of 0.1. The optimal semivariogram parameters, including the partial sill, full sill, range, and nugget, were determined to be 747.10896, 3692.06177, 0.00061, and 2944.95281, respectively. Figure 9b,c show the prediction and prediction standard deviation maps, respectively, generated using the optimized semivariogram for the RF prediction residuals. The map of residual predictions displays a distribution range of 0-80 mg/kg. As observed in both the RF and OK predictions, areas with dense sampling data, particularly in the upper-left region, exhibited significant variations in the predicted values due to substantial fluctuations in heavy metal concentrations. The map displays the standard deviation of the residuals within the range of 59-62 mg/kg. The higher standard deviation of residuals compared to the standard deviation of OK predictions for the sampling data is due to the range of residuals covering both negative and positive values, unlike the sampling data, which only include positive values. Furthermore, the residual  
The RF-OK map generated by combining the RF prediction map with the OK interpolated map of the RF residuals is shown in Figure 10a. The range of this predictive map was 39.283-737.450 mg/kg. Unlike the OK prediction map, which displays smoother transitions in concentration values, this map more closely resembles the RF prediction map, highlighting terrain features such as aspect. The RF-OK method yielded an error of 52.884 mg/kg and a coefficient of determination of 0.915. Figure 10b presents a comparative analysis of the actual data values and predictions obtained using the RF-OK approach. Furthermore, reflecting the characteristics of the interpolation methods, the map shows a tendency to overestimate at concentrations below 200 mg/kg and underestimate at higher concentrations. When comparing the prediction results of the RF model, OK method, and the proposed RF-OK model, the RF-OK prediction map showed a significant shift towards yellower tones in the upper-left region, where higher data values are distributed, compared to the RF prediction map. As previously mentioned, this map exhibits a pattern similar to that of the RF prediction map, which prominently displays topographical features rather than the smoother transitional pattern evident in the OK prediction map. Figure 9: Results of the RF residual analysis. (**a**) Distribution of RF residuals, (**b**) heavy metal concentration interpolated by the RF residual OK, and (**c**) OK standard deviation of the RF residual. The RMSE and R\({}^{2}\) values are plotted in Figure 11a to evaluate the predictive performances of the three interpolation methods. The RF-OK technique exhibited a 13.33 mg/kg decrease in the RMSE and 0.048 increase in the R\({}^{2}\) relative to the RF model, and a 12.217 mg/kg decrease in the RMSE and 0.044 increase in the R\({}^{2}\) compared to the OK model. Figure 11b shows the distribution of the predicted versus actual values for all three techniques. The RF-OK approach, which embodies typical interpolation characteristics, tended to overestimate at lower values and underestimate at higher values. Its distribution aligned more closely with the y = x line than that of the RF or OK methods.