# Predicting Freeway Travel Time Using Multiple-Source Heterogeneous Data Integration
## 3 Support Vector Machine Model
### Model Overview  
The SVM is a machine learning method, which is based on the statistical learning theory developed by [PERSON]. The theory has been further extended to diversified application algorithms, including the linear SVM classification algorithm, the nonlinear SVM classification algorithm, the linear SVM regression algorithm, and the nonlinear SVM regression algorithm [31]. These SVM algorithms have been widely used in many fields owing to their simple structure and high computational efficiency. As in Figure 2, Consider a training sample set of \(i\) training samples, \(S=\{(x_{i},y_{i})x_{i}\in R,y_{i}\in R\}_{i=1}^{l}\), which is non-linear, where \(x_{i}\) is the input column vector of the \(i\) training sample, \(x_{i}=\left[x_{i}^{1},x_{i}^{2}\cdots,x_{i}^{d}\right]^{T}\),\(y_{i}\in R\) is the corresponding output of the kernel function \(K(x_{i},y_{i})=\partial(x_{i})^{T}*\partial(x_{j})\). Equation (1) in the following is the linear regression equation established in the high dimensional space, and \(\varepsilon\) is introduced as a linear insensitive loss function:  
\[f(x)=\omega\partial(x)+b \tag{2}\]  
\[L(f(x),y,\varepsilon)=\left\{ \begin{array}{c}0,|f(x)-y|\leq\varepsilon\\ |f(x)-y|-\varepsilon,|f(x)-y|>\varepsilon\end{array} \right. \tag{3}\]  
where, \(\partial(x)\) is the nonlinear mapping function, \(f(x)\) is the prediction function, which returns the predicted value, and \(y\) is the corresponding real value. Under the above constraints, we can find the optimal classification hyper-plane, that is, find the solution to the following optimization problem. \[\left\{ \begin{array}{c}min\frac{\|\omega\|^{2}}{2}\\ s.t.\|\omega^{T}\partial(x_{i})+b-y_{i}\|\leq\varepsilon,i=1,2,\cdots,l\end{array} \right. \tag{4}\]  
This problem can be solved by solving the saddle point of the Lagrange function, and its dual theory can be applied to solve the dual problem. \[\left\{ \begin{array}{c}min\frac{1}{2}\sum\limits_{i=1}^{l}\sum\limits_{j=1} ^{l}\big{(}\alpha_{i}-\alpha_{i}^{*}\big{)}(\alpha_{j}-\alpha_{j}^{*})K\big{(} x_{i},x_{j}\big{)}+\varepsilon\sum\limits_{i=1}^{l}\big{(}\alpha_{i}-\alpha_{i}^{*} \big{)}-\sum\limits_{i=1}^{l}y_{i}\big{(}\alpha_{i}-\alpha_{i}^{*}\big{)}\\ s.t.\sum\limits_{i=1}^{l}\big{(}\alpha_{i}-\alpha_{i}^{*}\big{)}=0,\alpha_{i}^{* },\alpha_{i}\geq 0,i=1,2,\cdots,l\end{array} \right. \tag{5}\]  
To solve the dual problem, a relaxation factor can be set for each data point. After introducing these two relaxation factors, \(\xi_{i},\xi_{i}^{*}(\xi_{i},\xi_{i}^{*}\geq 0,i=1,2,\cdots,l)\), the function can be optimized as:  
\[\left\{ \begin{array}{c}min\frac{\|\omega\|^{2}}{2}+C\sum\limits_{i=1}^{l} \big{(}\xi_{i}-\xi_{i}^{*}\big{)}\\ s.t.\omega^{T}\partial(x_{i})+b-y_{i}\leq\xi_{i}+\varepsilon,i=1,2,\cdots,l\\ s.t.y_{i}-\omega^{T}\partial(x_{i})-b\leq\xi_{i}^{*}+\varepsilon,i=1,2,\cdots,l \end{array} \right. \tag{6}\]  
In the above equation, \(C\) is the penalty factor; the smaller the value, the smaller the penalty to the error data. Next, the Lagrangian multiplier method can be used to solve the optimization algorithm, and the nonlinear regression function can be further used to solve the double optimization problem. \[f(x)=\omega\partial(x)+b=\sum\limits_{i=1}^{l}(\alpha_{i}-\alpha_{i}^{*}) \partial(x_{i})^{T}*\partial\big{(}x_{j}\big{)}+b=\sum\limits_{i=1}^{l}( \alpha_{i}-\alpha_{i}^{*})K(x_{i},y_{i})+b \tag{7}\]For the freeways, there is essentially no significant error in the travel time between the low peak period and even the flat peak period. However, the impact of different traffic conditions on travel time is inevitable during peak periods. Therefore, the two cases should be discussed separately. Furthermore, the weekday and weekend result in entirely different travel time on the highway. The commuting time, travel purpose, and travel mode will also be different. Therefore, these two points should be viewed separately. In addition, road weather conditions and traffic control will have certain influence on the prediction results and should be considered.