## 2 Short-Term Traffic Flow Prediction Model Construction
### Modeling of Urban Associated Roads
#### 2.1.1 Road Association Rule Analysis  
The main steps of association rule analysis are as follows:  
1. Data attribute conversion  
According to the requirements of the Apriori method on data attributes, the numerical attribute transformation of urban traffic road flow data is carried out to transform the continuous characteristics of data into discrete attributes, and the data are divided according to congestion, and the specific division rules are as shown in Table 1.  
The table details the specific effects of changes in traffic volume on road conditions by comparing the continuous attribute of the road data (the percentage increase or decrease in traffic volume relative to the mean) with the discrete attribute (the level of congestion on the road). Specifically, when the current traffic volume is significantly lower than the average value (more than 30% or less), the road condition is characterized as smooth with little congestion, which indicates that vehicles can move smoothly. And when traffic volumes are slightly below average (below 10-30%), road conditions are smoother and less congested. When the traffic volume fluctuates around the mean (within \(\pm\)10%), the road begins to show signs of congestion, indicating that the traffic volume is close to or at the regular carrying capacity of the road. Further, when the traffic volume is above the mean (10-30% or more), road congestion increases and vehicle traffic slows down. Finally, when the traffic volume is significantly above average (more than 30%), the road condition becomes heavily congested, indicating that vehicular traffic is greatly affected and emergency measures may be required to alleviate traffic pressure. 1. Setting association rules  
We use the notation D to denote the basic urban road flow dataset used for modeling in this section. In the basic dataset D, the set consisting of all urban road flow data items is denoted as \(I=\{i_{1},i_{2},\ldots,i_{n}\}\). Assuming that the number of items in an item set is k, it is referred to as a k-item set. A frequent item set is a set of certain types of items that occur more often in the dataset D. Assuming that \(X\) and \(Y\) are both item sets with \(X\subset I\) and \(Y\subset I\) and that the intersection of \(X\) and \(Y\) is the empty set, the implication \(X\Rightarrow Y\) denotes an association rule among multiple association rules. 1. Calculate the degree of support  
The degree of support measures the frequency of each type of data item for traffic on a road within the set of traffic volume transactions for the entire highway [31]. The \begin{table}
\begin{tabular}{c c} \hline \hline
**Continuous Attributes of Road Data** & **Discrete Attributes of Road Data** \\ \hline Current traffic volume is more than 30 per cent less than the average value & Smooth roads \\ Current traffic volume is 10-30 per cent less than the average value & Roads are smoother. \\ Current traffic volume is 10 per cent above and below average & Roads are more congested. \\ Current traffic volume 10-30 per cent greater than average & Road congestion \\ Current traffic volume is more than 30 per cent greater than the average & Heavy road congestion \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Conversion rules for road numerical attributes. support of a data item set \(X\) is denoted as \(Support(X)\), which means the ratio of the number of transactions in D that contain \(X\) to the total number of transactions in the underlying dataset D, as shown in Equation (1):  
\[Support(X)=\frac{count(X)}{count(D)} \tag{1}\]  
The support of the association rule \(X\Rightarrow Y\) is equal to the support of the item set \(X\cup Y\). This relationship can be expressed in Equation (2) as follows:  
\[Support(X\Rightarrow Y)=\frac{count(X\cup Y)}{count(X)} \tag{2}\]  
If the support exceeds a predetermined minimum minsup, then, it can be considered as a frequent item; conversely, it can be considered as an infrequent item.