# Unequal Interval Dynamic Traffic Flow Prediction with Singular Point Detection
## 4 Singular Point Detection and Prediction via Wavelet Transform
### Singular Point Detection via Multiscale Wavelet Transform
It can also transform other characteristics, such as signalized and unsignalized junctions on a road segment, into the singular point implicitly. When the signal operation of the traffic light influences the traffic status strongly, this kind of singular point will not be smoothed, and reprediction is executed. Respectively, the selection of a wavelet relates to the traffic flow singular point detection as in the following two cases:  
Case 1: The maximal values of \(\text{WF}_{a}x(t)\) correspond to the singular points. The minimal values of \(\text{WF}_{a}x(t)\) are the fake singular points that are caused by the superposition, when the basic wavelet denotes the first-order derivative \(\theta_{a}^{(1)}(t)\) of the a specific low-pass smooth function \(\theta(t)\). The singular point \(T_{i}\) satisfies that  
\[ \begin{split}\text{WF}_{a}^{\prime}x(T_{i})&=0,\\ \text{WF}_{a}^{\prime\prime}x(T_{i})&<0.\end{split}  \tag{6}\]  
Case 2: The zero cross points of \(\text{WF}_{a}x(t)\) need further constraint to select the correct singular points when the basic wavelet denotes the second-order derivative \(\theta_{a}^{(2)}(t)\) of a specific low-pass smooth function \(\theta(t)\). The singular point \(T_{i}\) satisfies that  
\[ \begin{split}\text{WF}_{a}x(T_{i})&=0,\\ \text{WF}_{a}x(T_{i}+\epsilon)&>0,\\ \text{WF}_{a}x(T_{i}-\epsilon)&<0.\end{split}  \tag{7}\]Here, \(e\) denotes a tiny positive value. Based on the multiscale \(a\) and Equations (6) and (7), the system detects a sequence of successive singular points of \(\mathrm{WF}_{a}x(t)\) that combines as a set:  
\[SPS=\{T_{1},T_{2},\ldots,T_{i}\}. \tag{8}\]  
The elements in the set are a moment where the traffic flow has the abrupt abnormal points. Regarding the real-time traffic information as the original signal, the number of all the observed singular points denotes \(i\). The current observation process \(X_{t}\) is divided into a number of intervals, which are presented as unequal and nonuniform intervals. The duration of the \(k\)th interval is denoted as  
\[\Delta TS_{k}=T_{k}-T_{k-1},k\in 1,2,\ldots,i. \tag{9}\]  
Depending on the above equations, the system can detect all the singular points in both the real-time (observation) and historical (training) traffic flow data. Additionally, the continuous process is divided into several dynamic intervals, in which the duration of each interval is not a constant. The number of singular points depends on the wavelet scale, which is determined via iterations of an improved wavelet transform. The multiscale \(a\) is decreased during iterations. The stop criterion of multiscale iteration is expressed as \(\frac{\partial i}{\partial m}<\xi\). Here, \(i\) denotes the number of singular points detected by the multiscale \(a\) in the \(m\)th iteration. \(m\) is smaller than the maximum value of iteration. \(\xi\) is the threshold of the interval increment gradient. Based on the improved wavelet transform, the framework achieves the dynamic and adaptive singular point detection.