# Safety Evaluation of a Water-Immersed Bridge Against Multiple Hazards via Machine Learning
## 7 Least-Squares Support-Vector Machine (LSSVM)  
The aforesaid fragility curve was drafted according to the many results of structural analyses, and it is a time-consuming process. For this reason, LSSVM was used to construct a surrogate model and to rapidly establish the fragility curve for evaluating the performance of a bridge. The concept of LSSVM is to consider the key essential parameters as input vectors for a machine, and together with given outputs, the machine can be trained to learn in order to estimate the result through the learning process. The parameters (training input) considered in this article were the PGA, water level, and scouring depth. The displacement ductility demand (\(R_{D}\)) obtained from the structural analysis was used as the output data during the training. The LSSVM is briefly introduced below. SVM is a classifier that is able to solve a nonlinear problem using convex quadratic programs (QPs), as shown in Equation (20). \[\underset{w,p,\xi}{\text{minimize}} \frac{1}{2}w^{T}w+c\sum\limits_{k=1}^{N}\xi_{k}\] (20) Subject to \[\left\{ \begin{array}{c}y_{k}(w^{T}K(x_{i})+b)\geq 1-\xi_{k}\\ \xi_{k}\geq 0,\ i=1,2,\ldots,N\end{array} \right.\]  
in which \(y_{k}\) represents the class and \((w^{T}K\left(x_{i}\right)+b)\) indicates the classifier, \(w\) is a vector of weights that are orthogonal to the hyper-plane, \(c\) is a constant number that is greater than zero, and \(\xi_{k}\) is the slack variable. When \(\xi_{k}\) is greater than one, this indicates that the \(k\)-th inequality is violated. \(N\) is the number of data, and \(K\) is the kernel function, in which a Gaussian radial basis function (RBF) is one of the common kernels and was adopted here, as shown in Equation (21). \[K(X,X_{i})=e^{-o(\left\|X-X_{i}\right\|)^{2}}, \tag{21}\]  
in which vector \(X\) is an input, \(\sigma\) represents the kernel function parameter, and \(X_{i}\) is the support vector. The least-square support-vector machine (LSSVM, Suykens and Vandewalle, [26]) does not attempt to solve the QP problem. LSSVM actually tries to solve a system of linear equations after altering the SVM via introducing the error variable (\(\epsilon\)), as described in Equation (22). \[ \begin{array}{c}\min\frac{1}{2}w^{T}w+\frac{\gamma}{2}\sum\limits_{k=1}^{N} \xi_{k}^{2}\\ \text{s.t.}\ y_{k}(w\cdot K(x_{k})+b)=1-\epsilon_{k},\ k=1,\ldots,\text{n}\end{array}  \tag{22}\]  
in which \(\gamma\) is a constant number. It is seen that two modifications, equality constraints and a squared error variable, leads to solving a set of linear equations in LSSVM. When training the LSSVM, the training samples are separated into two portions. In the present case, 525 analysis data points previously obtained were split by an 8:2 ratio, randomly, in which 80% was used as the training samples and 20% was used to compare the estimate result. During training, these samples were separated into 10 groups for cross-validation in order to improve its accuracy and avoid overfitting. To implement the LSSVM in a computer, this study utilized the LSSVMlab toolbox provided by [PERSON] et al., which contains Matlab/C implementations for a number of LSSVM algorithms. To measure the performance of the trained LSSVM, 4 sets of indices were used: mean absolute error (MAE), mean absolute percentage error (MAPE), root-mean-square error (RMSE), and coefficient of determination (R\({}^{2}\)). The hyper-parameters (\(\alpha\) and \(\beta\)) of LSSVM are determined by particle swarm optimization (PSO). The joint-failure probability is assumed to be the product of three probabilities [27]: the probability of seismic hazard, the probability of scour hazard, and bridge failure probability for a given limit state.