## 3 Methodology
### Model Development  
In this study, tunnel element service state prediction models were developed mainly based on the LGBM. For comparison, five other machine learning algorithms, K-Nearest Neighbor (KNN), Support Vector Machine (SVM), Random Forest (RF), Decision Tree (DT), and Multi-Layer Perceptron (MLP), were also employed in building the service state prediction models.  
The LGBM algorithm is a distributed gradient-boosting framework based on the Decision Tree algorithm, which is characterized by high efficiency, fast speed, low memory consumption, and high accuracy, supporting parallel functions and processing large-scale data. A schematic diagram of this algorithm is shown in Figure 3. The training and prediction of the model were conducted using the LGBM model provided by the lightgbm library (version 3.3.3) in Python (version 3.8).  
A total of 1203 complete observations were used in this study, with 70% of the data used as a training set and 30% used as a testing set. For model optimization, we employed the grid search method using the GridSearchCV function from Scikit-Learn. Additionally, 5-fold cross-validation was employed to determine the optimal model parameters when training. This approach divided the training set into five subsets. One subset was used for validation, and the remaining four were used for training. This process was repeated five times, with each subset serving as the validation set once in a rotation. The resulting accuracies from the five models were averaged to obtain the validation results. The hyperparameters of the model were then tuned based on the highest average accuracy obtained from the 5-fold cross-validation [22].  
Figure 3: A schematic diagram of the LGBM algorithm solving classification problems.  
\begin{table}
\begin{tabular}{l l l} \hline \hline
**Feature Code** & **Retained Feature** & **Feature Type** \\ \hline F1 & Route Direction & Categorical \\ F2 & Route Type & Categorical \\ F3 & Tunnel Portal Latitude & Numerical \\ F4 & Tunnel Portal Longitude & Numerical \\ F5 & Tunnel Service Time & Numerical \\ F6 & Year Rehabilitated & Categorical \\ F7 & Number of Lanes & Categorical \\ F8 & Annual Average Daily Traffic (AADT) & Numerical \\ F9 & Annual Average Daily Truck Traffic (AADTT) & Numerical \\ F10 & Detour Length & Numerical \\ F11 & Service in Tunnel & Categorical \\ F12 & Direction of Traffic & Categorical \\ F13 & Toll & Categorical \\ F14 & Functional Classification & Categorical \\ F15 & Tunnel Length & Numerical \\ F16 & Minimum Vertical Clearance & Numerical \\ F17 & Tunnel Width & Numerical \\ F18 & Routine Inspection Interval & Categorical \\ F19 & In-Depth Inspection & Categorical \\ F20 & Damage Inspection & Categorical \\ F21 & Height Restriction & Categorical \\ F22 & Hazardous Material Restriction & Categorical \\ F23 & Other Restrictions & Categorical \\ F24 & Under Navigable Waterway & Categorical \\ F25 & Navigable Waterway Clearance & Numerical \\ F26 & Number of Bores & Categorical \\ F27 & Tunnel Shape & Categorical \\ F28 & Portal Shape & Categorical \\ F29 & Ground Conditions & Categorical \\ F30 & Complex & Categorical \\ \hline \hline \end{tabular}
\end{table}
Table 3: Features retained after feature screening.