## 5 Support Vector Regression  
For a given dataset \(D=\{(x_{1},y_{1}),(x_{2},y_{2}),\ldots,(x_{m},y_{m})\}\), where \(x_{i}=(x_{i1},x_{i2},\ldots,x_{id})^{T}\in\mathbb{R}^{d}\) is the \(i\)th sample with feature dimensionality of \(d\), and \(x_{ij}\) is the value for the \(j\)th feature, \(y_{i}\in\mathbb{R}\) is the corresponding target value of the sample and \(m\) is the number of samples. As shown in Figure 4, the linear kernel SVR is to find a function \(f(\mathbf{x})=\mathbf{\omega}^{T}\mathbf{x}+b\), where \(\mathbf{\omega}=(\omega_{1},\omega_{2},\ldots,\omega_{d})^{T}\in\mathbb{R}^{d}\) is a normal vector of the hyperplane and \(b\in\mathbb{R}\) is the offset between the hyperplane and the coordinate origin, such that the function is as flat as possible and has at most \(\epsilon\) deviation from each sample target value \(y_{i}\). The optimization objective is given by [26]:  
\[\min_{\mathbf{\omega},b}\frac{1}{2}\mathbf{\omega}^{T}\mathbf{\omega}+C\sum_{i=1}^{m}| \xi|_{\epsilon}(f(\mathbf{x}_{i})-y_{i}) \tag{10}\]  
Figure 3: Absolute correlation coefficient for ground motion parameters. Figure 2: Scatter of macroseismic intensity (MSI) versus ground motion parameters. where \(C\) is a regularization constant and \(|\xi|_{\epsilon}\) is an \(\epsilon\)-insensitive loss function, given by  
\[|\xi|_{\epsilon}=\left\{ \begin{array}{l}0,\text{ if }|\xi|\leq\epsilon\\ |\xi|-\epsilon,\text{ otherwise}\end{array} \right. \tag{11}\]  
The first term of Equation (10) is to describe the flatness of the function, and it is also called \"structural risk\". The second term of the equation, without \(C\), is to describe the fitness between the function and actual sample target values, and is also called \"empirical risk\". The constant \(C\) is a compromise between the two terms. In traditional linear regression, function loss is counted as long as the function value is not equal to the sample target value. This rule is too strict, and will result in overfitting. Since the determination of the sample target value could be disturbed by some subjective or objective factors, the sample target value contains a certain level of noise. To overcome this disadvantage, SVR counts function loss only when the difference between the function value and sample target value is larger than a given threshold \(\epsilon\). The condition \(C=0\) means only considering flatness, and SVR goes back to linear regression, while \(C\) approaching infinity means that every sample target value is within the \(\epsilon\) deviation of the corresponding function value. To describe the real deviation, two slack variables are introduced, and the primal objective function can be deduced from Equation (10) as  
\[\min_{\mathbf{\omega},b,\xi,\xi^{*}}\frac{1}{2}\mathbf{\omega}^{T}\mathbf{\omega}+C\sum_{i =1}^{m}\xi_{i}+C\sum_{i=1}^{m}\xi_{i}^{*} \tag{12}\]  
\[\text{subject to}\left\{ \begin{array}{l}\mathbf{\omega}^{T}\mathbf{x}_{i}+b-y_{i} \leq\epsilon+\xi_{i}\\ y_{i}-\mathbf{\omega}^{T}\mathbf{x}_{i}-b\leq\epsilon+\xi_{i}^{*}\\ \xi_{i},\ \xi_{i}^{*}\geq 0,i=1,2,\ldots,m\end{array} \right.\]  
To efficiently solve the above optimization problem with inequality constraints, the dual problem is obtained by using the Lagrange function method, given by  
\[\max_{\mathbf{\alpha},\mathbf{\alpha}^{*}}-\frac{1}{2}(\mathbf{\alpha}-\mathbf{\alpha}^{*})^{T }\mathbf{x}_{i}^{T}\mathbf{x}_{j}(\mathbf{\alpha}-\mathbf{\alpha}^{*})-\epsilon\sum_{i=1}^{m }\left(\alpha_{i}+\alpha_{i}^{*}\right)+\sum_{i=1}^{m}y_{i}\left(\alpha_{i}- \alpha_{i}^{*}\right) \tag{13}\]  
\[\text{subject to}\left\{ \begin{array}{l}\sum_{i=1}^{m}\left(\alpha_{i}- \alpha_{i}^{*}\right)=0\\ 0\leq\alpha_{i},\alpha_{i}^{*}\leq C\end{array} \right.\]  
Solve the above quadratic programming problem to get \(\mathbf{\alpha}\), \(\mathbf{\alpha}^{*}\), and the solution of the SVR is given by  
\[f(\mathbf{x})=\sum_{i=1}^{m}\left(-\alpha_{i}+\alpha_{i}^{*}\right)\mathbf{x}_{i}^{T }\mathbf{x}_{j}+b \tag{14}\]  
Figure 4: Sketch diagram for the support vector regression (SVR) method.