# Spatial Prediction of Soil Contaminants Using a Hybrid Random Forest-Ordinary Kriging Model
## 2 Materials and Methods
### Ok  
Kriging is a most popular geostatistical interpolation technique that includes several types of models, such as Simple Kriging, Universal Kriging, and OK. Simple Kriging simply minimizes the error variance, which has the limitations that the estimation equation is biased and the mean does not correspond to the population mean, while Universal Kriging is often used when the sampling data being analyzed show a specific trend of the mean varies with the locations. Conversely, OK is a commonly used technique for interpolating spatial data collected from arbitrary regions, providing unbiased estimates while also minimizing the variance. This is a reason why we chose OK among the geostatistical techniques in this study. OK is primarily used to interpolate spatial data collected from arbitrary areas, providing unbiased estimates while minimizing the variance. This is referred to as the best linear unbiased estimator (BLUE). This approach assumes that the unknown population mean is a fixed value and bases the estimation formula on an unbiased condition. The fundamental prediction equation for OK is expressed in Equation (3).  
\[Z^{*}_{OK}(x_{0})=\sum_{i=1}^{n}\lambda_{i}Z(x_{i}) \tag{3}\]  
where \(Z^{*}_{OK}(x_{0})\) represents the predicted values, \(n\) is the number of sampled data, \(\lambda_{i}\) is the weight at location \(i\), and \(Z(x_{i})\) is the values of the sampled data at location \(i\).  
OK implementation relies primarily on the construction and analysis of a semivariogram, which represents the degree of spatial correlation within a dataset over various distances. To construct a semivariogram, key variogram parameters, such as the Nugget, Sill, and Range, are estimated. These parameters significantly influence the weights assigned to the data points in the Kriging model, making their accurate estimation crucial. Table 2 lists the options and parameters that could be set in OK for this study. The variogram model was set to three different types, and the coordinate-type options included both Euclidean and geographic options. The number of lags ranged from 2 to 20, increasing in steps of two. Weights were categorized as False or True, with the True category further subdivided into increments of 0.1, ranging from 0.1 to 1.0. Finally, the number of closest points used in the estimation, which represents the number of nearest neighboring points, was incrementally increased from 1 to 20. Analyzing the semivariogram is vital, because it  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Option** & \multicolumn{4}{c}{**Parameter**} \\ \hline
**Bootstrap** & **No. of Estimator** & **Max Depth** & \
\begin{tabular}{c} **Min Samples** \\ **Split** \\ \end{tabular} &
\begin{tabular}{c} **Min Samples** \\ **Leaf** \\ \end{tabular} \\ \hline \multirow{3}{*}{True/False} & Min 10 & None/ & Min 2 & Min 1 \\  & Max 300 & Max 50 & Max 10 & Max 5 \\  & Step 50 & Step 10 & Step 2 & Step 1 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Setting of the Random Forest options and parameter grid.  
provides important information for selecting an appropriate model based on the inherent spatial correlation structure of the data.