# Dynamic Tensor Modeling for Missing Data Completion in Electronic Toll Collection Gantry Systems
## 3 Materials and Methods
### ETC Gantry Data Completion Method Based on Improved Tensor Decomposition
#### 3.2.2 Laplacian Matrix for Sparsity Control  
The dynamic tensor flow decomposition model for ETC gantry data is illustrated in Figure 5. This model postulates that a segment of vehicle passage information is represented by the tuple \((c,e,v,t)\), where the passage information \(v\) for vehicle \(c\) at gantry \(e\) is recorded in period \(t\), \((t=1,...,T)\). The ETC gantry data, structured as a time-series, form a dynamic  
Figure 4: Diagrams of the dynamic tensor flow decomposition: (**a**) tensor window diagram; (**b**) diagram of the tensor flow decomposition. tensor sequence \(\mathcal{X}_{t}\in R^{n_{c}\times n_{e}\times n_{e}}\), where \(n_{c}\) is the count of vehicles passing within the chosen time, \(n_{e}\) denotes the quantity of ETC gantries, and \(n_{v}\) represents the volume of passage data points. Leveraging Tucker decomposition, the dynamic tensor sequence decomposes as:  
\[\mathcal{X}_{t}\approx Y_{t}\times_{(c)}C_{t}\times_{(e)}E_{t}\times_{(v)}V_{t} \tag{6}\]  
where \(Y_{t}\in R^{r^{(c)}\times r^{(c)}}\times r^{(v)}\) is the core tensor sequence encapsulating dynamic behavioral patterns that describe the interplay among vehicles, gantries, and passage information. It signifies the likelihood of the occurrence for passage information from group \(j^{(v)}\) at group \(j^{(e)}\) gantries for vehicles belonging to group \(j^{(c)}\) before time \(t\). The matrix \(C_{t}\in R^{n_{e}\times r^{(c)}}\) serves as the vehicle factor matrix up until time \(t\), where \(C_{t}\Big{(}i^{(c)},j^{(c)}\Big{)}\) indicates the probability that the \(i^{(c)}\)th vehicle belongs to the \(j^{(c)}\)th vehicle group. The matrix \(E_{t}\in R^{n_{e}\times r^{(c)}}\) is the factor matrix for the ETC gantries before time \(t\), and \(E_{t}\Big{(}i^{(e)},j^{(e)}\Big{)}\) illustrates the likelihood that the \(i^{(e)}\)th gantry belongs to the \(j^{(c)}\)th gantry group. The matrix \(V_{t}\in R^{n_{v}\times r^{(v)}}\) represents the factor matrix for passage information until time \(t\), and \(V_{t}\Big{(}i^{(v)},j^{(v)}\Big{)}\) denotes the probability that the \(i^{(v)}\)th passage belongs to the \(j^{(v)}\)th passage information group. The tensor model for ETC gantry traffic data is inherently intricate. While large tensor windows yield strong classification capabilities, they concomitantly escalate computational complexity [31]. To maintain the precision of tensor approximation decomposition within homogenous tensor groups, we introduced variable tensor window sizes. The interrelation among discrete tensor blocks was quantified using the Pearson correlation coefficient \(r_{ij}\), setting the tensor window size predicated on the threshold \(r_{ij}>0.95\). The Pearson correlation coefficient and the corresponding tensor window size are computed as follows:  
\[r_{ij}=\frac{COV\big{(}X_{i},X_{j}\big{)}}{\sqrt{\sigma_{X_{i}}\sigma_{X_{j}}}} \tag{7}\]  
\[w_{i}=\sum_{j=1}^{T}sgn(r_{ij})sgn(r_{ij})= \begin{cases}1,\ r_{ij}\geq 0.95\\ 0,\ r_{ij}<0.95\end{cases}  \tag{8}\]  
Figure 5: Dynamic tensor processing of ETC gantry traffic data. Figure 6 illustrates the range of maximum and minimum tensor window values, which vary according to different correlation coefficients. To minimize the computational load while preserving the integrity of the tensor decomposition approximations, this study synthesized the established discriminative threshold of the Pearson correlation coefficient with the concrete context of the ETC gantry data [32]. A correlation coefficient exceeding \(0.95\left(r_{ij}>0.95\right)\) is indicative of a strong correlation, prompting the adjustment of the tensor window size to this stringent standard. To address the challenges posed by high data sparsity, the Laplacian matrices \(L_{(c)},L_{(c)}\), and \(L_{(v)}\) were employed, quantifying the similarity among individual entities and their collective groups, namely, passing vehicles, ETC gantries, and transit information. The Laplacian matrix is defined as:  
\[L=D-W \tag{9}\]  
where \(D\) is the degree matrix, and \(W\) is the similarity matrix.