# Study on Abnormal Pattern Detection Method for In-Service Bridge Based on Lasso Regression
## 5 Lasso Regression Model Based on Monitoring Data  
Based on the analysis of the SHM data, this paper further explores the correlations between various types of data. Specifically, the power spectral density (PSD) of equivalent traffic load, structural temperature, and structural vertical fundamental frequency were analyzed separately. The results are shown in Figure 6. In this paper, the horizontal axis of the PSD has been adjusted from frequency to period (the inverse of frequency) to emphasize the impact of long-period components at lower frequencies. From the figure, it can be observed that there are two different periodic components present in the equivalent traffic load, structural temperature, and structural vertical fundamental frequency, namely, 24 h and 8192 h. These two periods correspond to different time scales: 1 day and 1 year, respectively. Therefore, based on these two different time scales, a quantitative model for the relationship between load and structural vertical fundamental frequency is established in this paper. According to the basic theory of Lasso regression algorithm and bridge monitoring data, this paper establishes two different time scales for the Lasso regression models: daily cycle and annual cycle. The input variables for the Lasso regression model of structural temperature are shown in Table 1. The input variables for the Lasso regression model of equivalent traffic load are shown in Table 2.  
Figure 5: Structural frequency. \begin{table}
\begin{tabular}{c c c} \hline \hline
\begin{tabular}{c} \(x_{11}^{tpc-y}\) represents the second-order term of the principal component of the annual cyclic temperature variables. \\ \(x_{11}^{tpc-y}\) represents the third-order term of the principal component of the annual cyclic temperature variables. \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The structural temperature variables of the Lasso regression model under different time scales. Figure 6: Power spectral density of structural response and fundamental frequency. Based on the aforementioned methods for solving the Lasso model parameters, this paper employs cross-validation techniques to calculate the MSE and standard deviation of the Lasso regression model at different \(\lambda\) values. Taking into account the complexity and fitting accuracy of the Lasso regression model, the values of \(\lambda\) for the daily and annual scales of the Lasso regression model are determined separately, as shown in Figure 7. Once the values of \(\lambda\) are determined, the Lasso regression models can be established based on the SHM data. In order to further improve the prediction accuracy of the Lasso regression model, this paper utilizes machine learning methods based on the monitoring data of the bridge to train and validate the model. Specifically, the monitoring data from 17 March 2016 to 31 December 2018 are selected as the training set, and the monitoring data from 1 January 2019 to 31 December 2019 are selected as the test set. The Lasso regression models trained by machine learning are used to predict the residuals in the test set at different time scales, as shown in Figure 8. From the figure, it can be observed that the Lasso regression model under the annual cycle scale has less prediction dispersion, while the Lasso regression model under the daily cycle scale has more prediction dispersion. In other words, as the time scale decreases, the prediction results of the Lasso regression model are more influenced by random factors, and the degree of residual dispersion also increases significantly.