# Effective Bus Travel Time Prediction System of Multiple Routes: Introducing PMLNet Based on MDARNN
## 3 Materials and Methods
### Method
#### 3.2.1 Data Pre-Processing
\begin{table}
\begin{tabular}{l l} \hline
**Variable/Function** & **Explanation** \\ \hline \(D_{d}\), \(D_{r}\), \(D_{m}\) & The raw datasets, denoted as Equations (5) and (6). \\ \(D_{d_{i}}\) & Currently reading driving data at time \(t_{i}\), consists of \(\{D_{d_{i}}^{1},\ldots,D_{d_{i}}^{46}\}\). \\ \(t_{i}\) & The time feature of \(D_{d_{i}}\). \\ \(d_{i}\) & The date feature of \(D_{d_{i}}\). \\ \(D_{fused}\) & The fused dataset, denoted as Equation (7). \\ \(D_{fused_{i}}\) & Currently fusing data at time \(t_{i}\). \\ \(T\) & The peak periods set. \\ \(H\) & The holiday set. \\ \(S\) & The coordinate set of stops from \(D_{r}\), where the difference in latitude and longitude between both fall within a range of 0.0001 degrees. \\ \(IF^{1}_{macro_{i}}\) & The peak factor of macro impact factor at time \(t_{i}\), where Peak\_Label is a constant indicating the \(i\), is in \(T\). \\ \(IF^{2}_{macro_{i}}\) & The holiday factor of macro impact factor at time \(t_{i}\) of date \(d_{i}\), where Holiday\_Label is a constant indicating the \(d_{i}\), is in \(H\). \\ Macro impact factor about meteorologic at time \(t_{i}\): maximum and minimum temperature factor, air quality factor, week factor, date factor. \\ \(\{IF^{1}_{local_{i}},\ldots,IF^{46}_{local_{i}}\}\) & The driving factor of local impact factor at time \(t_{i}\), such as speed, acceleration, throttle state, brake state, etc. \\ \(IF^{47}_{local_{i}}\) & The trip number factor of local impact factor at time \(t_{i}\). \\ \(I^{48}_{local_{i}}\) & The stop factor of local impact factor at time \(t_{i}\). \\ \(D^{1}_{d_{i}},\ldots,D^{46}_{d_{i}}\) & Raw feature of \(D_{d}\) at time \(t_{i}\). \\ \(D_{m_{i}},\ldots,D_{m_{j}}\) & Raw feature of \(D_{m}\) at time \(t_{i}\). \\ \((Lat_{i},Lng_{i})\) & The bus location coordinates of \(D_{d_{i}}\) at time \(t_{i}\). \\ \(get\_coordinate\_set\) (\(D_{r}\)) & Get the coordinate set of stops from \(D_{r}\), where the difference in latitude and longitude between stops both fall within a range of 0.0001 degrees. \\ \(fill\_factor\) (\(A_{i},B_{i}\)) & Filter redundancy and erroneous data, fill \(B_{i}\) with \(A_{i}\), if \(A_{i}\) is outlier (e.g., Null), fill \(B_{i}\) with \(A_{i-1}\). \\ \(get\_trip\_factor\) (\(D_{d_{i}}\)) & Get the trip order number, return how many times the bus has reached the start and end stop at time \(t_{i}\) of \(D_{d_{i}}\). \\ \(get\_stop\_factor\) (\(\left(\text{Lat, Lng}\right)\), \(S\)) & Get the stop factor of stop impact factor, if \(\left(Lat,Lng\right)\) exists within the coordinates of a stop of \(S\), return the serial number of the stop. \\ \(get\_data\) (\(D_{d_{i}}\)) & Get \(\left(Lat,Lng\right)\), \(t_{i}\) and \(d_{i}\) from \(D_{d_{i}}\). \\ \(fuse\_data\) (\(A_{i}\), \(B_{i}\)) & Fuse data \(A_{i}\) and \(B_{i}\) as \(\{A_{i},B_{i}\}\) according to Equation (7). \\ \(add\) (\(D_{fused_{i}}\), \(D_{fused}\)) & Add fusing data \(D_{fused_{i}}\) to \(D_{fused}\). \\ \hline \end{tabular}
\end{table} 
Table 2: The explanation for Algorithm 1 variables and functions. ```
Input:\(D_{\textit{fused}}^{A}\)\(D_{\textit{fused}}^{B}\), \(D_{r}\) Output:\(D_{X\to Y}\)
1\(D_{X\to Y}\leftarrow\textit{Null}\);
2\((Z1,Z2,Z3)\gets\textit{get\_coordinates}(D_{r})\);
3 foreach\(D_{\textit{fused}}^{A}\), in \(D_{\textit{fused}}^{A}\)do
4\((\mathrm{Lat}_{i}^{A},\mathrm{Lng}_{i}^{A})\gets\textit{get\_location}(D_{ \textit{fused}_{i}}^{A})\);
5 if\((Lat_{i}^{A},Lng_{i}^{A})\subseteq Z1\)then
6 if\((Lat_{i}^{A},Lng_{i}^{A})\subseteq Z2\)then
7 foreach\(D_{\textit{fused}}^{B}\), in \(D_{\textit{fused}}^{B}\)do
8\((\mathrm{Lat}_{j}^{B},Lng_{j}^{B})\leftarrow\textit{get\_location}(D_{ \textit{fused}_{j}}^{B})\);
9 if\((Lat_{j}^{B},Lng_{j}^{B})\subseteq Z3\)andis_first_arrive(\(D_{\textit{fused}_{i}^{A}}^{A},D_{\textit{fused}_{j}}^{B})\)then
10 add\((D_{\textit{fused}_{j}}^{B},D_{X\to Y})\);
11
12 else
13 add\((D_{\textit{fused}_{i}^{A}}^{A},D_{X\to Y})\);
14
15 return\(D_{X\to Y}\);
```  
**Algorithm 2**Travel chain construction algorithm  
**Lemma 2**.