## 2 Methodology
### Prior Distribution Based on Data-Driven Method  
In Bayesian methods, the prior distribution of the parameters must be specified. The prior distributions in this study assume conjugate form since the conjugate prior distribution, which is in the same probability distribution family as the posterior distribution, offers a closed-form posterior distribution [35]. In order to estimate prior distributions on the parameters with two components, this paper used the k-means clustering method. The k-means clustering is popular for cluster analysis in data mining and has a low computational cost.  
\[w_{k} \sim \text{Dirichlet}(e_{1},\cdots,e_{K}) \tag{5}\] \[\tau_{k} \sim \text{Gamma}(\alpha,\beta)\] (6) \[\mu_{k}|\tau_{k} \sim \text{N}(\mu_{0},n_{0}\tau) \tag{7}\]  
where \(w_{k}\), \(\tau_{k}\), and \(\mu_{k}\) are the parameters of the Gaussian mixture distribution. Dirichlet is the conjugate prior for weight distribution and \(e_{1},\cdots,e_{K}\) are the hyper-parameters of the prior distribution. Gamma is the conjugate prior for precision distribution and \(\alpha,\beta\) are the hyper-parameters of the prior distribution. N is the conjugate prior for mean distribution and \(\mu_{0},n_{0}\tau\) are the hyper-parameters of the prior distribution.  
The hyper-parameters of \(w_{k}\), \(\tau_{k}\), and \(\mu_{k}\) in this study are estimated by the data-driven method based on historical data according to the characteristics of travel time regularity [30; 31]. The data-driven method is a prediction algorithm used to compare the distance between current and historical neighbors to find neighbors that are closest to the current states. The method assumes that traffic conditions similar to the current one exist in the past and usually estimates state values using a large amount of historical traffic data to select the candidates through the Euclidean distance with the current data sequence. It assumes current and historical travel time sequences, which are denoted by tail time; the distance between two sequences is calculated using the Euclidean distance, which represents the dissimilarity measure between these two sequences. The data-driven method has been used in numerous studies for predicting short-term traffic conditions [36; 37; 38; 39; 40]. For the hyper-parameters of prior distribution in this study, the optimal number of hyper-parameters of prior distribution was calculated through the trial-and-error method. The number of hyper-parameters of prior distribution with the minimum error was selected, and 10 was selected, and to estimate prior distributions on the parameters with two components, k = 2 is chosen in k-means clustering.  
The data sequence length of the data-driven method is chosen to be 3 periods (15 min), which entails travel time patterns in short-term traffic flow. To increase accuracy and to decrease computational cost, the k-candidates in the data-driven method are selected while searching past data in the same time slot.  
\[\text{Min. Dist}=\sqrt{\sum_{i=1}^{n}\left(T_{i}^{c}-T_{i}^{h}\right)^{2}},\text { ``for all samples''} \tag{8}\]  
where \(T_{i}^{c}\) is the ith current travel time sequence, \(T_{i}^{h}\) is the ith historical travel time sequence, n is the length of travel time sequence, and Dist is a dissimilarity measure at time t between the two sequences, obtained using the Euclidean distance.