## 3 Manifold Dimension Transformation of Raman Spectra of Oil-Paper Insulation
### Processing the Raman Data on Oil-Paper Insulation Aging Via XGBoost Discrimination Method
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Hyperparameter** & **Adjustment Range** & **Hyperparameter** & **Adjustment Range** \\ \hline n\_estimators & (1, 100) & Colsample\_bytes & (0.5, 1) \\ max\_depth & (1, 10) & learn\_rate & (0.1, 1) \\ gamma & (0, 1.0) & reg\_alphaN & (0.0, 1.0) \\ subsample & (0.5, 1) & reg\_lambda & (0.0, 1.0) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Range of hyperparameter adjustments. Figure 10: The relationship between XGBoost hyperparameters and discriminant accuracy. (**a**) N_estimators; (**b**) Max_depth; (**c**) Gamma; (**d**) Subsample, Colsample; (**e**) Learn_rate; (**f**) Reg_alpha, Reg_lambda. sensitivity of the XGBoost classification model to that specific hyperparameter. Table 3 illustrates these results. From Table 3, it can be observed that colsample, reg_alpha, and reg_lambda have a minimal impact on the XGBoost model's classification accuracy. Therefore, default values can be used for these parameters. Ultimately, the hyperparameters to be optimized are n_estimators, max_depth, gamma, subsample, and learning_rate. For hyperparameter optimization, common methods include grid search, random search, particle swarm optimization (PSO), and Bayesian optimization (BO). Grid search exhaustively searches all the grid points within the hyperparameter ranges to determine the optimal combination of hyperparameters. However, it can be time-consuming when there are many hyperparameters with a wide range of values. Random search is similar to grid search but randomly samples points within the given hyperparameter ranges to find the optimal point. This method does not guarantee finding the best hyperparameter combination. PSO algorithm has shown good optimization performance for hyperparameter optimization in XGBoost models [28; 29]. However, it suffers from the drawback of being prone to local optima, and the optimization results have a certain failure rate. BO is an effective global optimization method. Unlike grid search and random search, BO constructs a surrogate function to approximate the objective function based on the existing hyperparameter combinations. It reduces the computational cost of evaluating the objective function and introduces an acquisition function to effectively explore and exploit the evaluation points with the minimal loss function. BO can achieve the minimum value of a complex loss function with fewer optimization iterations, significantly improving the efficiency of hyperparameter optimization. The Raman spectrum sample loss function can serve as the objective function of BO as follows:  
\[obj=min\left[\sum_{i=1}^{K}\left(\mathbf{y}_{i}-\overline{\mathbf{y}}_{i}\right)^{2} \right], \tag{23}\]  
where \(K\) represents the number of Raman spectrum samples in the data. With the Bayesian optimization iteration set to 50, the process of hyperparameter optimization for the XGBoost classification model on the four and ten categories of Raman spectrum samples after Isomap feature extraction is shown in Figure 11.  
From Figure 11, it can be observed that the four and ten categories, respectively, obtained the lowest values of the loss function during the 44 th and 46 th iterations of the optimization process. The optimization process for each category took only 6.8 s and 8.8 s, respectively. To validate the improvement in accuracy achieved by the BO-XGBoost model, the XGBoost without hyperparameter optimization, Particle-Swarm-Optimization-based XGBoost (PSO-XGBoost), and BO-XGBoost were applied to the ten-category Raman spectroscopy samples after Isomap feature extraction for aging state classification in twenty trials. The final classification accuracies are depicted in Figure 12.