# An Adaptive Moving Window Kriging Based on K-Means Clustering for Spatial Interpolation
## 1 Introduction  
Geostatistics is an applied statistical field used to estimate an attribute at unsample positions by employing sparsely observed data points. Its concept was first proposed by [PERSON] [1], who exploited the available information to predict ore reserve variability in South African goldmines. [PERSON] further provided a detailed theoretical framework, initially proposed by [PERSON], on linear estimators for interpolation through the theory of regionalized variables published in [2]. Geostatistics techniques have been widely employed in various applications, including mining engineering [3, 4, 5, 6], environmental sciences [7, 8, 9, 10], and meteorology [11, 12, 13, 14]. Kriging is a geostatistical interpolation approach that provides the best linear unbiased estimator (BLUE) with the minimum error variance. Kriging can be classified into two types regarding stationary structures: krigings with second-order stationary conditions (ordinary kriging (OK) [3, 15] and simple kriging (SK) [3, 16]) and non-stationary krigings (universal kriging (UK) [3] and kriging with external drift (KED) [3, 17]). The kriging process often assumes the stationarity property to accommodate estimating the spatial covariance function. This assumption does not usually hold in observational data, especially for highly irregular domains. Although non-stationary geostatistical techniques are appropriate undersuch circumstances, other auxiliary information closely related to the target variable is required prior to the interpolation. It is practically difficult to gain additional data at all positions. A concept of using data in a neighborhood in the estimation, a so-called local window [18; 19], has thus been put forward. A moving window kriging initiated by [PERSON] [20] was demonstrated in acid deposition. The domain was divided into circular windows under the stationary assumption, despite the presence of non-stationarity in the data. The window size of sub-regions plays a crucial role in the moving window kriging estimation process, and its predetermination should be carried out. Several criteria for window size selection have been proposed. The imposition of either an influence radius or the number of neighbors is a simple and commonly employed approach. Examples include the work by [PERSON] et al. [21] and [PERSON] et al. [22], who estimated column-averaged CO\({}_{2}\) concentrations using nearby neighbors within a prescribed radius of 2000 km. This particular radius was chosen as it was sufficiently large to encapsulate distinct variability patterns and small enough to maintain local features. [PERSON] [23] incorporated the moving window approach to cokriging to predict sulfate deposition in USA. He suggested that the number of sampling positions centered on the estimated site should be 17 points and increased by a multiple of 17. The optimal results were achieved when using a window size of 85 sites. [PERSON] et al. [24] applied the moving window algorithm to kriging with a trend model (KT) to characterize the spatial variation pattern of terrain in the Lake District, UK. The results from different window sizes ranging from 4 to 32 samples were compared with 16 sampling positions, producing the best predictions. On the other hand, [PERSON] and [PERSON] [3] proposed that the minimum number of positions required in any kriging model to provide a stable estimate should be 30 sites. [PERSON] et al. [25] subsequently considered this number of a window size for moving window universal kriging to estimate monthly rainfall in the west of the African continent. Despite their flexibility and simplicity, the optimal technique to specify either a radius or the number of positions is still unclear. Cross-validation (CV) is a heuristic procedure presented by [PERSON] et al.