# Emerging Data-Driven Calibration Research on an Improved Link Performance Function in an Urban Area
## 3 Solution Method
### Bayesian Optimization  
The calibration problem is a complex nonlinear optimization problem. However, Bayesian optimization (BO) is well suited to handle it. BO is a probabilistic model-based optimization algorithm that uses a surrogate model to approximate the objective function and an acquisition function to balance exploration and exploitation. Studies have found that BO is widely applied in the solving of traffic optimization problems [44; 45; 46; 47]. The BO framework consists of two main parts: using a probabilistic model to substitute the original evaluation of costly and intricate objective functions, such as the Gaussian process, and using the posterior information of the surrogate model to create active selection strategies, such as acquisition functions. The Gaussian process is an infinite-dimensional generalization of the multivariate normal distribution. It is a convenient and robust prior distribution. Let \((\mathbf{A}_{i},Z_{i})\) represent a sample in the calibration problem, where \(\mathbf{A}_{i}\) denotes the parameters in this problem and \(Z_{i}\) is the corresponding objective function value. Let \(\overrightarrow{\mathbf{Z}}=[\ldots,Z_{i},\ldots]^{T}\) denote the vector of function observations and let \(\overrightarrow{\mathbf{\mu}}=[\ldots,E[Z_{i}],\ldots]^{T}\) represent the vector of the expected values of function observations. The Gaussian process assumes that the vector of \(n\) samples \(\{(\mathbf{A}_{i},Z_{i})\}_{i=1}^{n}\) generates a multivariate Gaussian distribution:  
\[\overrightarrow{\mathbf{Z}}\sim\mathcal{N}\Big{(}\overrightarrow{\mathbf{\mu }},\Sigma\Big{)}. \tag{7}\]  
Here, \(\Sigma\) is the covariance matrix. The form of the distribution is decided by a mean function and a covariance function. In general, the expected value does not affect the optimization process, so a common practice is to set \(E[Z_{i}]\) to a constant, i.e., \(E[Z_{i}]=\mu_{0}(\mathbf{A}_{i})=c\). In the Gaussian process, the covariance between \(Z_{i}\) and \(Z_{j}\) is measured by the distance between \(\mathbf{A}_{i}\) and \(\mathbf{A}_{j}\), \(\big{\|}\mathbf{A}_{i},\mathbf{A}_{j}\big{\|}_{2}^{2}\). It is assumed that a smaller distance between \(\mathbf{A}_{i}\) and \(\mathbf{A}_{j}\) will lead to a higher correlation between \(Z_{i}\) and \(Z_{j}\). The covariances are generally calculated using the kernel functions. In this paper, the ARD Matern 5/2 kernel is used:\[cov\big{(}Z_{i},Z_{j}\big{)}=\kappa_{M52}\big{(}\mathbf{A}_{i}, \mathbf{A}_{j}\big{)}\] \[=\alpha\Bigg{(}1+\sqrt{5\frac{\|\mathbf{A}_{i},\mathbf{A}_{j}\|}{l^ {2}}}{l^{2}}+\frac{5}{3}\frac{\|\mathbf{A}_{i},\mathbf{A}_{j}\|}{l^{2}}\Bigg{)} \cdot\exp\Bigg{\{}-\sqrt{5\frac{\|\mathbf{A}_{i},\mathbf{A}_{j}\|}{l^{2}}}{l^ {2}}\Bigg{\}}. \tag{8}\]  
Here, \(\alpha\) and \(l\) are parameters of this kernel. This covariance function is twice differentiable. These parameters can be estimated by using the maximum likelihood estimation approach. For any new sample \((\mathbf{A}^{\prime},Z^{\prime})\), the prior distribution can be rewritten as:  
\[\Bigg{[} \begin{array}{c}\stackrel{{\rightarrow}}{{\mathbf{Z}} }\\ Z^{\prime}\end{array} \Bigg{]}\ \sim\ \mathcal{N}\Bigg{(}\Bigg{[} \begin{array}{c} \stackrel{{\rightarrow}}{{\mathbf{\mu}}}\\ \mu_{0}(\mathbf{A}_{i})\end{array} \Bigg{]}^{\prime}\Bigg{[} \begin{array}{ cc}\Sigma&cov\Bigg{(}\stackrel{{\rightarrow}}{{\mathbf{Z}}},Z^{ \prime}\Bigg{)}\\ cov\Bigg{(}\stackrel{{\rightarrow}}{{\mathbf{Z}}},Z^{\prime} \Bigg{)}^{T}&cov(Z^{\prime},Z^{\prime})\end{array} \Bigg{]}\Bigg{)}.