# Unequal Interval Dynamic Traffic Flow Prediction with Singular Point Detection
## 5 Multiscale Traffic Flow Prediction via Vasicek Model
### Unequal Element Solution via Matrix Decomposition  
The prediction model is designed via Equation (18) and sets the RMSE as the metric of prediction objection via Equation (19). However, because the observation is divided into several unequal intervals and the elements in the matrix are unequal, the solution of the parameter \(\alpha\) considers the unequal elements. Based on the decomposition model [35], we extend the observation as a matrix, and the algorithm will deal with the unequal elements by matrix decomposition and composition during the algorithm solution [36]. In the following, we present an approach delivering the efficient solution of offsetting the unequal size elements in \(X^{T}WX\). \(X_{k}\) in the set \(\{X_{1},\ldots,X_{i}\}\) is an unequal element, which depends on the dynamic interval division in the above section. \(X_{k}\) can be decomposed further into a smaller subelement, which denotes  
\[X_{k}=[x_{1},\ldots,x_{p}], \tag{26}\]  
in which the length of \(X_{k}\) denotes \(p\), and it relates to the \(k\)th interval's length. Therefore, \(p\) is a variable and different for all the divided process from \(X_{1}\) to \(X_{i}\). This relation between the size of the matrix \(X_{k}\) and the length of the \(k\)th interval can be described as  
\[p\propto\Delta TS_{k}. \tag{27}\]  
Here, \(\Delta TS_{k}\) is the length of the interval \(k\), which can be obtained by Equation (9). Therefore, all the elements in the matrix \(X\) can be decomposed to offset the difference among these unequal intervals. Suppose that \(X_{1}\) to \(X_{i}\) are all decomposed based on Equations (26) and (27), and then the original matrix \(X\) can be decomposed along its column as  
\[X=[x_{1},x_{2},\ldots,x_{m}]. \tag{28}\]  
Furthermore, the complexity process can omit parts of a useless calculation and be simplified via a quadratic form. Since \(W\in(diag)^{m\times m}\) is a diagonal matrix that has the property of \((W^{\frac{1}{2}})^{T}W^{\frac{1}{2}}=W\), \(W\) is decomposed via \(W^{\frac{1}{2}}\) along its row, which presents it as \(\Lambda=W^{\frac{1}{2}}\) and denotes  
\[\Lambda=\left( \begin{array}{c}\Lambda_{1}\\ \Lambda_{2}\\ \vdots\\ \Lambda_{m}\end{array} \right). \tag{29}\]  
Then, the original unequal elements \(X^{T}WX\) can be transformed as  
\[ \begin{split} X^{T}WX&=\left(\begin{array}{c}x_{1}\\ x_{2}\\ \vdots\\ x_{m}\end{array}\right)\left(\begin{array}{c}\Lambda_{1}\\ \Lambda_{2}\\ \vdots\\ \Lambda_{m}\end{array}\right)^{T}\left(\begin{array}{c}\Lambda_{1}\\ \Lambda_{2}\\ \vdots\\ \Lambda_{m}\end{array}\right)\left(\begin{array}{c}x_{1}\\ x_{2}\\ \vdots\\ x_{m}\end{array}\right)^{T}\\ &=\left(\sum_{c=1}^{m}x_{c}\Lambda_{c}\right)^{T}\left(\sum_{d=1}^{m}\Lambda _{d}x_{d}\right)\\ &=\sum_{c=1}^{m}\sum_{d=1}^{m}x_{c}^{T}\Lambda_{c}^{T}\Lambda_{d}x_{d}.\end{split}  \tag{30}\]  
\(\Lambda\) gives an orthogonal decomposition as  
\[\Lambda_{c}^{T}\Lambda_{d}= \begin{cases}0&c\
eq d\\ \Lambda_{c}^{T}\Lambda_{c}&c=d.\end{cases}  \tag{31}\]  
Therefore, Equation (30) can be transformed as  
\[ \begin{split} X^{T}WX&=\sum_{c=1}^{m}\sum_{d=1}^{m}x_{c}^{T} \Lambda_{c}^{T}\Lambda_{d}x_{d}\\ &=\sum_{c=1}^{m}x_{c}^{T}\Lambda_{c}^{T}\Lambda_{c}x_{c}.\end{split}  \tag{32}\]  
Therefore, the unequal size element of \(X^{T}WX\) can be transformed and output the optimization solution based on Equation (32). Accordingly, since \(Y\) denotes the discrete integral that is sampled from \(X\) and has the same size as \(X\), the other term \(X^{\text{T}}WY\) of Equation (24) can be obtained in the same method that is denoted as  
\[ \begin{split} X^{\text{T}}WY&=\sum_{c=1}^{m}\sum_{d= 1}^{m}x_{c}^{T}\Lambda_{c}^{T}\Lambda_{d}y_{d}\\ &=\sum_{c=1}^{m}x_{c}^{T}\Lambda_{c}^{T}\Lambda_{c}y_{c}.\end{split}  \tag{33}\]  
After the decomposition and transformation steps, the solutions of \(\alpha\), \(X\), \(W\), and \(Y\) are presented via \([x_{1},\ldots,x_{m}]\) and \(\Lambda\).