# A Comparative Study on Traffic Modeling Techniques for Predicting and Simulating Traffic Behavior
## 4 Spatiotemporal Traffic Prediction Models
### The ST-Kriging Approach  
The Kriging method [21] was first developed by [PERSON] in 1960 and is mainly used for spatial interpolation prediction. Kriging techniques are well known for optimal spatial prediction and Gaussian process regression. Kriging is a common statistical prediction method that is used by geologists. Subsequently, Kriging became widely used in numerous research works and studies, which made Kriging an essential tool in statistical studies of geographical data. Kriging was later generalized for spatiotemporal prediction and given the name ST-Kriging. The main idea in ST-Kriging is that spatial variability can be characterized by two major components. The first one deals with large-scale variation, exploring the data distribution and capturing trends and outliers. The second component deals with small-scale spatial variation to calculate the spatial autocorrelation and fitting semivariogram to obtain the prediction [22]. Spatial autocorrelation will take into account two functions--the distance and the degree of variation between known data points--when estimating values in unknown areas. Formally, the ST-Kriging equation can be derived from the following:  
\[[Z(s,t):s\in D_{s}\subset\mathbb{R}^{d},\;t\in D_{t}\subset\mathbb{R}^{d}] \tag{1}\]  
In Equation (1), the random variable \(Z\) is the value at location \(s\) at time \(t\), and \(D_{s}\) is a vector of spatial coordinates \((x_{i},y_{i})\), where \(i=1,2,3,...,n\):  
\[Z_{(s\uparrow)}=\mu_{(s\uparrow)}+\epsilon(s;t) \tag{2}\] \[\mu_{(s\uparrow)}=\chi\beta \tag{3}\]  
In Equation (2), \(Z\) is a function of random variables at location \(s\) at time \(t\), and \(\mu\) is the conditional mean of large-scale variability. The second component that defines the spatial variability of the Kriging architecture is the small-scale variability that is represented as \(\epsilon\), or it can be defined as the noise that captures the large-scale variation. The mean in Equation (3) refers to a function of the observed variables \(\chi\) through the parameter \(\beta\). Figure 2: A schematic diagram of spatiotemporal models. A major step in fitting the ST-Kriging model is to estimate the space-time covariance model, which will be estimated by cross-validation (CV) methods. The covariance function shown in Equation (4) estimates the covariance of the observation of random variables at two spatial points. ST-Kriging is governed by a prior covariance matrix based on the data distribution:  
\[Cov(X_{i},Y_{i})=covZ(X_{i}),Z(Y_{i}) \tag{4}\]  
The ST-Kriging method yields the mean square error (MSE) of the variance (\(\sigma^{2}\)) and a number of linear predictors. It develops its prediction by selecting the minimum variance linear unbiased predictors. A study conducted by [PERSON] and [PERSON] [23] provided a comparison between Kriging methods and geographically weighted regression (GWR) to predict the annual average daily traffic (AADT) counts when the temporal component was excluded. The findings observed in this study have shown that the prediction accuracy of AADT that was provided by Kriging achieved more confidence than GWR. Kriging can control the spatial attributes at unsampled locations by calculating the distance using the spatial autocorrelation function. This function reduces the error in the AADT prediction, with their results indicating that the average absolute error was reduced by up to 63% and the mean square error was reduced by 50%. However, this study highlights a number of challenges when using Kriging for prediction. First, Kriging's prediction lies on a covariance matrix and an inverse covariance matrix, and with large-scale data, matrix inversion is difficult. Therefore, Kriging prediction is implemented on data with a limited size. Another challenge is optimizing the semivariogram estimation and selecting the optimal lag size and number of lags. Another piece of research by [PERSON] et al. [24] studies the problem of modeling the missing values in traffic data that are collected by road sensors.