Shield screw conveyor rotating speed prediction method based on long-horned beetle mixed particle swarm and XGBoost model
By using the BAS-PSO-XGBoost hybrid model in the speed prediction of shield screw conveyors, the problems of low search efficiency and poor randomness in the existing technology are solved, and higher prediction accuracy and control accuracy are achieved, which is suitable for a wider range of applications. geological conditions.
Patent Information
- Application Number
- CN202411447740.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-02-14
AI Technical Summary
The prior art has problems of low search efficiency and poor randomness in the speed prediction of shield screw conveyors, which affects the accurate control of the excavation parameters of shield machine.
The BAS-PSO-XGBoost hybrid model based on the Tianniu mixed particle swarm and XGBoost model is adopted. By adding local search stages based on the PSO algorithm, the random search ability of individual particles is improved, and the ultra-superior of the XGBoost model is adjusted through the BAS-PSO algorithm. parameters to build more efficient machine learning models.
It improves the accuracy and control accuracy of the speed prediction of shield screw conveyors, expands the adaptation range of geological conditions, enhances the generalization ability of the model, has faster response speed, and has more accurate prediction and control effects.
Smart Images

Figure CN119442854A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of shield construction monitoring, and in particular relates to a method for predicting the rotation speed of a shield screw conveyor based on a longicorn mixed particle swarm and an XGBoost model. Background Art
[0002] The shield construction method is the main method of tunnel construction, which has the advantages of small disturbance to the soil and high construction efficiency. Since the shield screw conveyor is an important device for the shield machine to adjust the soil bin pressure, its speed control is one of the key parameters of the shield machine during excavation. Reasonable setting of screw conveyor parameters is the key to ensure efficient and safe tunnel construction.
[0003] At present, machine learning has gradually become the main method for controlling shield machine excavation parameters. Optimization algorithms such as grid search and particle swarm are often used to adjust the hyperparameters in machine learning models, but these methods have problems such as low search efficiency and poor randomness.
[0004] The XGBoost model is a machine learning algorithm based on Gradient Boosting, which is derived from the gradient boosting tree. XGboost builds multiple weak evaluators, such as decision tree models, which are built during the iterative calculation of the model. Then XGboost aggregates the results of all weak evaluators to form a strong evaluator. XGboost introduces the second-order derivative to perform Taylor expansion in the loss function solution, making the model results more accurate. Summary of the invention
[0005] In view of the problems existing in the prior art, the present invention proposes a method for predicting the speed of a shield screw conveyor based on a longhorn beetle mixed particle swarm and an XGBoost (Extreme Gradient Boosting) model, that is, a hybrid model of BAS-PSO-XGBoost is constructed by integrating the longhorn beetle mixed particle swarm and the XGBoost model, which is used to predict the speed of a shield screw conveyor. Specifically, on the basis of the PSO algorithm, combined with the concept of the longhorn beetle mixed particle swarm search method, a local search stage is added in the process of updating the position of a single particle to improve the random search ability of a single particle, wherein each combination of the hyperparameters of the shield parameter control model represents a particle; the BAS-PSO method can accurately and effectively adjust the hyperparameters of the shield parameter control XGBoost model, thereby constructing an effective machine learning model and improving the model's prediction and control accuracy of the key parameters of the shield machine.
[0006] Technical solution of the present invention:
[0007] A method for predicting the speed of a shield screw conveyor based on a hybrid particle swarm and an XGBoost model comprises the following steps:
[0008] Step 1: Delete the 0 value and remove all data with a shield screw conveyor speed level of 0 from the shield machine data set;
[0009] Step 2: Missing value processing, using linear interpolation to fill in missing values in the original data;
[0010] Step 3: Outlier processing: outlier processing based on speed constraint repair;
[0011] Step 4: Feature selection, select the features with the highest correlation with the label through construction experience and chi-square filtering method.
[0012] Step 5: Construct training samples and normalize sample data, dividing the original data set into training set, validation set and test set;
[0013] Step 6: Construct a hybrid model of BAS-PSO-XGBoost for predicting the speed of shield screw conveyor;
[0014] Step 7, use the training samples in step 5 to train the BAS-PSO-XGBoost hybrid model;
[0015] Step 8, obtaining the real-time status data of the shield machine, using the prediction model obtained in step 7 to obtain the prediction data of the screw conveyor speed for the shield screw conveyor speed control.
[0016] Beneficial Effects
[0017] 1Compared with the traditional particle swarm optimization algorithm, this method improves the search randomness of a single particle.
[0018] 2Compared with other hybrid machine learning models, this method has better model prediction accuracy.
[0019] 3 Compared with the traditional shield screw conveyor speed prediction method, this method has a wider range of adaptability to geological conditions, enhanced model generalization ability, faster response speed, and more accurate prediction and control effect on the shield screw conveyor speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 The updating method of particle position in BAS-PSO algorithm;
[0021] Figure 2 The framework for building a prediction model for screw conveyor speed based on hybrid particle swarm optimization of longicorn;
[0022] Figure 3 BAS-PSO-XGBoost hybrid model processing flow chart;
[0023] Figure 4It is a comparison of four indicators of different models in the embodiments of the present invention (a. indicator accuracy b. indicator Recall c. indicator F1-Score d. indicator precision);
[0024] Figure 5 Comparison of confusion matrix prediction results of different models in the embodiments of the present invention (a. SVM model b. Decision tree model c. Ordinary XGBoost model d. Random forest e. PSO-XGBoost f. PSO-RF g. BPSO-XGBoost h. BPSO-RF);
[0025] Figure 6 Schematic diagram of the time required for different models to calculate predictions;
[0026] Figure 7 Changes in accuracy during iterations (a. XGBoost model b. Random Forest model);
[0027] Figure 8 The change of accuracy during the iteration process Figure 1 (w=0.1,c1=2,c2=2)(a.XGBoost model b.Random Forest model);
[0028] Fig. 9 The change of accuracy during the iteration process Figure 2 (w=1,c1=2,c2=2)(a.XGBoost model b.Random Forest model). DETAILED DESCRIPTION
[0029] The technical solution provided by the present application will be further described below in conjunction with specific embodiments and accompanying drawings. The advantages and features of the present application will become more apparent with the following description.
[0030] The screw conveyor is an important device for regulating the soil bin pressure in the shield machine, and its speed is one of the key parameters of the shield machine during excavation. This embodiment takes the prediction of the speed of the shield screw conveyor as an example, and proposes a machine learning model construction method based on the BAS-PSO-XGBoost algorithm. The model uses XGBoost as the model body, and based on the longhorn beetle hybrid particle swarm (BAS-PSO, abbreviated as BPSO in this article) algorithm, it efficiently determines the hyperparameters in the model construction process. Finally, a BAS-PSO-XGBoost hybrid model is constructed for the control and prediction of the speed of the shield screw conveyor, which improves the intelligence level of shield construction and the rationality of the excavation parameter setting.
[0031] The prediction method of screw conveyor speed based on hybrid particle swarm optimization of longicorn includes the following steps: (e.g. Figure 2 shown):
[0032] Data preprocessing
[0033] Before building the model, the shield machine data set should be preprocessed, with the speed of the shield screw conveyor as the prediction label and other physical quantities as training features. The original data set should be divided into training set, validation set and test set to complete the preparation work for building the model. The specific data preprocessing includes the following steps:
[0034] Step 1: Delete the 0 value and remove all data with a shield screw conveyor speed level of 0 from the shield machine data set;
[0035] Shield tunnel construction includes multiple stages such as excavation and segment assembly. The shield screw conveyor is not always in operation. The speed level of the shield screw conveyor when not excavating is 0. Therefore, all data with a speed level of 0 for the shield screw conveyor are removed from the data set. The removed data are usually collected in the segment assembly stage, which does not contribute to the control model of the shield screw conveyor speed and will increase the complexity and calculation time.
[0036] Step 2: Missing value processing, using linear interpolation to fill in missing values in the original data;
[0037] In the sample set, some samples have missing features, and linear interpolation is used to fill in the missing values in the original data. The sample data comes from a mechanical structure with inertia, so the continuous values are smooth. Linear interpolation can fit the trend of the data better than the commonly used methods, making the missing values closer to the actual values. When using linear interpolation, the approximate value of the missing point (x, t) is calculated using two points (x0, t0) and (x1, t1) adjacent to the missing point, as shown in the following formula:
[0038]
[0039] Step 3: Outlier processing: outlier processing based on speed constraint repair;
[0040] The shield data set is a continuous time series. Affected by construction vibration, communication interference, etc., the data set will contain some outliers, and single-point outliers are the main ones. After removing the data with a speed level of 0 for the shield screw conveyor, generally speaking, the outliers in the remaining data can still be deleted. However, when each feature contains outliers, excessive deletion of valid data will lead to reduced model accuracy, so an effective outlier repair method is needed instead of direct deletion.
[0041] Since the components in the equipment have inertial properties, the data collected from engineering equipment usually does not change suddenly. The analog data such as cylinder displacement, cylinder pressure, and tunneling speed in the shield machine all have this characteristic. Based on this feature, the speed constraint-based repair method is used to deal with abnormal values.
[0042] Specifically, the rate of change of the two values will be limited to a certain range:
[0043]
[0044] In the above formula, speed constraint s=(s min ,s max ) is mainly selected based on the construction organization plan and the inherent parameters of the shield machine. The constraint range that cannot be directly selected is selected according to the 3σ principle of the characteristic statistics of each dimension. i and x j It is the value of two adjacent timestamps in a column of data.
[0045] The repair process of this method is to define a cleaning window and check whether a data point and its adjacent data in the window meet the speed constraint conditions one by one. For values that do not meet the constraint conditions, the repair is completed according to the speed constraints of the previous and next time values.
[0046] Variables that are not convenient for determining the speed constraint range, or data that do not have inertial characteristics, are filtered according to the thresholds set by the construction standards.
[0047] Step 4: Feature selection, select the features with the highest correlation with the label through construction experience and chi-square filtering method.
[0048] The shield data sample set has more than 370 features, most of which are irrelevant or only slightly relevant to the setting of the shield screw conveyor speed. Feature selection is a necessary step to improve the accuracy of the learning model. Feature selection is conducive to reducing model complexity, reducing computational costs, and avoiding the mixing of noise data into the model.
[0049] Firstly, judging by construction experience, according to the construction organization plan and the experience of shield drivers and experts, some features are obviously considered to be irrelevant to the setting of the shield screw conveyor speed, so these features are eliminated.
[0050] The present invention removes all digital features such as alarm status data, abnormal status data, signal selection data, start-up status data, etc. from the original data set, and removes analog features related to subsystems such as foam, cooling, and sealing.
[0051] After the initial selection of features by empirical method, there are still many features that may be related to the speed of the shield screw conveyor. The present invention uses the chi-square filtering method to further select features. The chi-square filtering method specifically serves discrete label sets, by calculating the chi-square statistic between each feature and the label, and ranking the features from high to low according to the chi-square statistic. The 20 features with the highest correlation with the label are finally selected as follows:
[0052] Soil pressure at the rear end of the screw conveyor, total thrust, horizontal angle, lower right soil bin pressure, cutter disc torque, rear end vertical deviation, penetration, thrust speed, upper right soil bin pressure, right soil bin pressure, upper soil bin pressure, lower left soil bin pressure, left soil bin pressure, upper left soil bin pressure, horizontal hinge angle, lower soil bin pressure, screw conveyor pressure, screw conveyor torque, screw conveyor front pressure, vertical deviation at the front end, left thrust, cutter disc speed, upper thrust, right cylinder stroke, upper cylinder stroke, lower cylinder stroke, right thrust, left cylinder stroke, lower thrust, vertical intersection angle.
[0053] Step 5: Construct training samples and normalize sample data;
[0054] The input sample set is constructed as follows:
[0055] The shield data sample set has more than 370 features, which are arranged in chronological order and have about 20,000 rows, forming an original sample set of 370 columns * 20,000 rows.
[0056] Based on the features selected in step 4, select the data corresponding to 20 feature columns to form a training sample data set of 20 columns * 20,000 rows, which is saved in the form of a two-dimensional list. The internal dimension list corresponds to 20 data points included in 1 row of data, and the external dimension list corresponds to 20,000 rows. The two-dimensional list is used as the sample set of input parameters. From the original sample, select 20,000 rows corresponding to the target column shield screw conveyor speed as the label set of the input parameter.
[0057] Data of different dimensions have large differences in dimension and order of magnitude. After outlier processing, in order to improve the accuracy of the model and increase the speed of model solution, the present invention normalizes the sample data. The Min-Max Scaling method is used to center the data according to the minimum value first, and then scale it according to the range. Specifically, the following formula is used for each dimensional feature:
[0058]
[0059] In the formula, x * is the normalized data, x is the data before normalization, max(x) is the maximum value in the data of this dimension, and min(x) is the minimum value in the data of this dimension.
[0060] Divide the original data set into training set, validation set and test set to complete the preparation work for building the model.
[0061] Step 6: Construct a hybrid model of BAS-PSO-XGBoost for predicting the speed of shield screw conveyor;
[0062] The screw conveyor speed prediction model based on hybrid particle swarm optimization of longicorn is based on the XGBoost model as the main model, and the BAS-PSO algorithm is used to adjust the hyperparameters of the XGBoost model to form a BAS-PSO-XGBoost hybrid model for the screw conveyor speed control of the shield machine.
[0063] It should be noted that the XGboost algorithm is an existing technology and an integrated algorithm derived from the gradient boosting tree. XGboost constructs multiple weak evaluators, such as a decision tree model, which are constructed during the iterative calculation of the model. Then XGboost aggregates the results of all weak evaluators to form a strong evaluator. XGboost introduces the second-order derivative to perform Taylor expansion in the loss function solution, making the model results more accurate.
[0064] When machine learning methods are used for shield tunneling parameter prediction and control, a major problem is to accurately determine the algorithm's hyperparameters. The XGBoost model contains multiple hyperparameters, such as learning rate, leaf weight, etc. Different combinations of hyperparameters will greatly affect the performance of the model.
[0065] Furthermore, the present invention selects five XGBoost model hyperparameters as the optimization targets of the BAS-PSO algorithm, as follows:
[0066] The learning rate determines the contribution of the model to the new weak learner in each iteration. When selecting this parameter, the convergence speed of the algorithm and the accuracy of the model need to be considered comprehensively.
[0067] The hyperparameter gamma is a parameter used to control the interaction between weak learners and to control the complexity of the model.
[0068] The hyperparameter reg_alpha is a parameter used to control the weight of the model for L1 penalty, which prevents the model from overfitting by adding a regularization term in the objective function.
[0069] The hyperparameter subsample controls the proportion of random sampling for each tree, which is used to improve the generalization of the model.
[0070] The hyperparameter colsample_bytree controls the ratio of column sampling for features used to generate each tree, which is used to improve the generalization of the model.
[0071] Furthermore, the present invention uses the BAS-PSO algorithm to optimize the hyperparameters of the machine learning model as follows:
[0072] Particle swarm optimization (PSO) is often used to optimize the hyperparameters of machine learning models and build hybrid models. The construction process of the traditional PSO algorithm is as follows:
[0073] Suppose there are n particles in D-dimensional space, and the position x of the particle is i =(X1,X2,...,X D ), the particle's velocity V i =(V1,V2,...,V D ), and the objective function f(x).
[0074] (1) In the search space, the position and velocity of the particle swarm are randomly initialized.
[0075] (2) Use the objective function (fitness function) f(x) to calculate the fitness value f(x) of each particle i ).
[0076] (3) Update the historical optimal position pbest of each individual particle i =(p i1 ,p i2 ,...,p id ), record the historical optimal position of the particle group gbest = (g1, g2, ..., g d ).
[0077] (4) Update the particle's velocity and position using the following formula:
[0078] The d-dimensional velocity of particle i is updated using the following formula
[0079]
[0080] The update of the d-dimensional position of particle i uses the following formula:
[0081]
[0082] In the above formula, is the d-th component of the velocity of particle i at the k-th iteration. is the d-th dimension component of the position of particle i at the k-th iteration. c1, c2 are acceleration constants used to adjust the update step size. r1, r2 are random numbers with values of [0,1] used to increase the randomness during the search. w is the inertia weight used to adjust the search range of the solution space.
[0083] (5) Determine whether the termination condition is met. If yes, the search is completed and the optimal position of the particle is obtained; if no, return to step (2).
[0084] It should be noted that the hybrid machine learning model based on PSO usually groups D customized hyperparameters into particles of dimension D (such as the 5 XGBoost model hyperparameters selected in the present invention), and uses the accuracy of the machine learning model as the fitness function f(x). However, the random search ability of a single particle in the standard PSO algorithm is poor and it is easy to fall into the local optimum.
[0085] In order to improve the search ability of a single particle, the present invention integrates the idea of the Beetle Antennae Search (BAS) model into the particle swarm optimization algorithm and proposes a new BAS-PSO algorithm. The BAS algorithm is derived from the foraging process of the beetle. The beetle detects the odor concentration through two antennae and determines the next moving direction. The steps of the BAS model search are as follows:
[0086] (1) Randomly initialize the D-dimensional direction vector And unitize:
[0087]
[0088] (2) Calculate the coordinates of the two whiskers and the fitness value:
[0089]
[0090] Where t is the number of iterations of the BAS algorithm, and are the positions of the left and right whiskers of the particle, d0 is the distance between the two whiskers, and f(x) is the objective function.
[0091] (3) The particle moves to the next position:
[0092]
[0093] Where step is the step size of the particle when it is updated, and sign() is the sign function.
[0094] On the basis of the PSO algorithm, the method of the present invention regards a single particle in the PSO as an individual longicorn. When a particle updates its position, it first determines the next search direction and distance through the ordinary PSO model, and then uses the BAS to perform local search to determine the final position of the particle within the local range.
[0095] Figure 1 The search process of a single particle in the BAS-PSO model is demonstrated. Figure 1(a) shows that a single particle first calculates the next iteration direction based on the global direction, individual direction and inertial direction of the particle group. Figure 1 (b) shows that a single particle determines the direction of the next iteration based on the PSO method.
[0096] Figure 1 (c) (d) The method of updating the position of a single particle in the BAS-PSO algorithm is described. The new position of the particle first moves a certain distance according to the direction determined by PSO. Then, a vector d is randomly initialized and searched in a small local range. For two-dimensional space, it is searched in a circle of random size in a plane. For space higher than three dimensions, it is searched in a hypersphere for the next moving distance and direction, and moves a small distance based on the local search results. See Figure 1 (d) will be explained later The determination method of , so the particle position update method is:
[0097]
[0098] In the above formula, μ is the step size ratio of PSO. 1-μ represents the ratio of the local search phase, denoted as μ0.
[0099] is the local displacement increment of the particle solved using the BAS algorithm, It can be calculated by the following formula.
[0100]
[0101] To determine the vector BPSO will calculate the positive and negative endpoints of the unit vector d The fitness value of The direction of is the same as the direction with the higher fitness value. Figure 1 (c). After the direction is selected, the moving distance is determined. Step represents the step size of the local search particle iteration. The initial value is 0.95, and the step size is gradually reduced in each iteration, as shown in the following formula, where st is the ratio of the step size reduction in each iteration of the algorithm, and st is a constant.
[0102] step k =step k-1 / st (4)
[0103] and is the left and right position of the particle, and the calculation method is as follows
[0104]
[0105] The above steps illustrate the iterative method of particles in the BPSO algorithm. The core idea is to use the BAS search method to fine-tune the direction when the particle position is updated to improve the search ability of a single particle in the PSO.
[0106] Step 7, use the training samples in step 5 to train the BAS-PSO-XGBoost hybrid model;
[0107] Specifically, step 7 includes the following steps (such as Figure 3 shown):
[0108] Step 7.1: Determine the parameters of the BAS-PSO hybrid model, which mainly include the number of particles N, the dimension of each particle D, the maximum number of iterations k, the local learning factor c1, the global learning factor c2, the inertia weight w, the initial step size step of the local search, and the step size attenuation ratio st.
[0109] According to the commonly used empirical values in the ordinary PSO algorithm, the number of particles N is 50, the constants c1 and c2 are selected as 2, the inertia coefficient w is selected as 0.9, the iteration ratio μ is selected as 0.9, and the iteration step step is selected as 1.3.
[0110] Step 7.2: Determine the maximum number of iterations k.
[0111] k is selected based on experience, preferably 50.
[0112] Step 7.3: Randomly initialize the initial positions and velocity directions of N particles.
[0113] Step 7.4: Run the XGBoost model using the training set and validation set divided in the preparation work to calculate the fitness value of the particle.
[0114] Step 7.5: Update the particle velocity using equation (1).
[0115]
[0116] in, is the d-th component of the velocity of particle i at the k-th iteration; is the d-th dimension component of the position of particle i at the k-th iteration; c1, c2 are acceleration constants used to adjust the update step size; r1, r2 are random numbers with values of [0,1], used to increase the randomness during the search; w is the inertia weight, used to adjust the search range of the solution space; pbest i =(p i1 ,p i2 ,...,p id ), is the historical optimal position of each particle, gbest=(g1,g2,...,gd ), record the historical optimal position of the particle group;
[0117] Step 7.6: Update the local search step of the particle using equation (4);
[0118] step k =step k-1 / st (4)
[0119] Among them, step k is the local search step size when the particle is updated at the kth iteration;
[0120] Step 7.7: Use equation (5) to solve the left and right search point positions of the particle;
[0121]
[0122] Step 7.8: Calculate the fitness values Fleft and Fright of the two search points, compare and save the better one as the fitness of the particle.
[0123] Step 7.9: Calculate the local adjusted position of the particle using equation (3).
[0124]
[0125] Step 7.10: Calculate the new position of the particle using equation (2).
[0126]
[0127] Step 7.11: For each particle, compare its fitness value with the individual historical best fitness pbest. If the current value is smaller, update pbest.
[0128] Step 7.12: For each particle, compare its fitness value with the global optimal fitness gbest. If the current value is smaller, update gbest.
[0129] Step 7.13: Determine whether the number of iterations is met. If it is met, exit gbest and obtain the left-middle solution. If it is not met, return to step 7.5.
[0130] Step 7.14: Use the test set to evaluate the performance of the prediction model.
[0131] Step 8, obtaining the real-time status data of the shield machine, using the prediction model obtained in step 7 to obtain the prediction data of the screw conveyor speed for the shield screw conveyor speed control.
[0132] In order to prove the superiority of the present invention, an experimental environment was constructed to compare the performance of the BAS-PSO-XGBoost model proposed in the present invention and the traditional method.
[0133] The main test is the performance of the BAS-PSO-XGBoost model (abbreviated as BPSO-XGBoost model) and the performance of the BAS-PSO algorithm (abbreviated as BPSO). All programs are written in pyhton3.6. The version of the sklearn library used in this experiment is 0.24.2. The experimental program runs in the Tencent Cloud server, and its specific parameter configuration is CPU AMDEPYC 7K62 48-Core Processor, memory 64GB, and operating system CentOS 7.5 64.
[0134] In order to test the performance of the BPSO-XGBoost model, decision tree, RandomForest, PSO-RandomForest, XGBoost, PSO-XGBoost, SVM and other models were used for comparative verification. Accuracy, recall, F1 score, and precision were used as evaluation indicators. When calculating the indicators, the present invention used the parameter "weighted" to calculate the scoring indicators for each speed level, and used their weighted average to represent the prediction effect of multiple classifications. The present invention also constructed a confusion matrix to analyze the prediction effect of different models on the speed level of the shield screw conveyor.
[0135] As a comparison, the present invention is Figure 3 The steps of the invention respectively use PSO and BPSO algorithms to construct a hybrid random forest model and a hybrid XGBoost model. In the process of constructing the PSO-RandomForest model, the BPSO-RandomForest model, the PSO-XGBoost model and the BPSO-XGBoost model, the BPSO and PSO algorithms are used to search for the optimal hyperparameters of the main model. The present invention compares the search efficiency difference between the BPSO algorithm and the PSO algorithm.
[0136] The parameters of the BPSO search algorithm are set according to step 7.1. Tables 1 and 2 show the selection results of hyperparameters in PSO-XGBoost, BPSO-XGBoost, PSO-RF, and BPSO-RF hybrid models.
[0137] The present invention divides the original data set into a training set and a test set according to the ratio of 70% and 30%. The XGBoost model and the random forest model will use the parameters in Table 1 and Table 2 to complete the model construction. The SVM, Decision Tree and other models use the default parameters in the sklearn library to complete the modeling. The test set data is used to evaluate the effect of the model.
[0138] Table 1 Some hyperparameter settings of XGBoost
[0139]
[0140] Table 2 Some hyperparameter settings of RandomForest
[0141]
[0142]
[0143] (1) Comparison of accuracy, precision, recall and F1 score
[0144] First, four metrics, accuracy, precision, recall, and F1 score, are used to evaluate the performance of different models. Figure 4 The control effects of all models on the speed level of the screw conveyor are demonstrated.
[0145] The prediction results of the model can be divided into four types: true positive (TP), false positive (FP), true negative (TN), and false negative (FN). Here, TP represents the number of samples correctly classified as positive. TN represents the number of samples correctly classified as negative. FP represents the number of samples incorrectly identified as positive. FN represents the number of samples incorrectly identified as negative.
[0146] Based on the above four types of predictions, the four metrics can be defined as follows: Accuracy is the ratio of correctly predicted samples to total samples. The accuracy is A = (TP + TN) / (TP + FP + FN + TN). Accuracy is the ratio of correctly predicted positive samples to samples predicted positive. The precision in the formula is P = TP / (TP + FP). Recall is the ratio of correctly predicted positive samples to actual positive samples. In the formula, recall is R = TP / (TP + FN). The F1 score is the weighted average of precision and recall, and the formula is F1 = 2 × P × R / (P + R).
[0147] Among these models, SVM has the lowest accuracy, precision, recall and F1 score because SVM is a linear classifier based on the maximum interval and does not work well when dealing with nonlinear problems. The performance of decision tree is better than SVM, but lower than random forest and XGB. Random forest and XGB models are ensemble learning models based on decision trees. Both use decision trees as weak learners. Therefore, when dealing with multi-input problems, the model accuracy is higher than the other two methods. The random forest model optimized by BPSO and PSO has a higher prediction accuracy than the unoptimized model. The optimized BPSO-XGB model and PSO-XGB model have higher prediction accuracy, recall and F1 score than the unoptimized model.
[0148] Among all the models, the BPSO-XGBoost model has the highest accuracy and other indicators, and its model prediction accuracy is the best.
[0149] Through experimental comparison, it is found that the selection of hyperparameters will affect the effect of the model, and the BPSO algorithm can be well used for hyperparameter selection. The model optimized by the BPSO algorithm has better prediction effect than the original model. And the machine learning model optimized by the BPSO algorithm has a higher accuracy than the machine learning model optimized by the PSO algorithm.
[0150] (2) Confusion matrix prediction results comparison
[0151] In the comparative experiment, the prediction target of all models is the speed level of the shield screw conveyor. The confusion matrix is often used to evaluate the classification effect, which can help to analyze the prediction effect of different models on a certain speed level in more detail. In the confusion matrix, one row represents the true value of the data, and one column represents the prediction result of the model. The values on the diagonal of the matrix represent the number of matches between the model prediction value and the true value of the data. Therefore, the higher the value on the diagonal, the more values the model predicts correctly, and the better the performance of the model. Figure 5 (a) to (h) show the confusion matrices of all models. The darker the color of the square, the higher the accuracy of the corresponding category.
[0152] from Figure 5 It can be seen that all models have high accuracy in judging speed levels of 1 to 3, 4, 5, and 12 to 18. Among them, the optimized BPSO-XGBoost model and BPSO-RF model have higher accuracy.
[0153] In the confusion matrix, the darker the squares are, the higher the prediction accuracy is. Figure 5 It shows that when the model predicts medium-level speeds, the accuracy is relatively low. Figure 5(a)(b) show the confusion matrices of SVM and DT. SVM judges most of speed levels 6, 7, 9, and 10 as level 8. It also judges speed level 11 as level 8 or level 9. The performance of decision tree is better than that of support vector machine, but the decision tree model identifies part of level 6 as level 7 and part of level 7 as level 8. Similarly, Figure 5 (c) to (h) show the low accuracy of all models for speed levels 6 and 7 and speed levels 10 and 11.
[0154] The reason for this result is that the data used to train the model comes from the actual operation of the shield machine. The speed depends on the operator and is therefore somewhat subjective, which results in some similar samples corresponding to different targets (speed levels).
[0155] For example, different drivers can set different speed levels for the same operating conditions. Driver A may think that level 6 is the best choice under the current conditions, while driver B may think that level 7 is the best choice. Therefore, sometimes the data in the original sample is not well differentiated. When level 6 speed is applied to an engineering project, it is also reasonable to set the speed to level 5 or level 7.
[0156] Therefore, the present invention suggests using confidence instead of accuracy, that is, the sum of the accuracy of the prediction level and its adjacent levels, to measure the credibility of the model in engineering applications. Table 3 shows the confidence results of different models for predicting the speed of shield screw conveyors.
[0157] Table 3 Prediction confidence of different models and main speed levels
[0158]
[0159] SVM identifies level 7 as level 8 and level 9 as level 8. Based on the previous discussion, the present invention believes that the prediction results are credible. Based on the definition of confidence, the present invention believes that the confidence of SVM for level 7 prediction is 86.41%, which is the sum of the prediction accuracy of levels 5, 6, and 7. Although the confidence of the support vector machine for levels 7 and 8 is high. However, the prediction results of levels 6 and 11 are far from the approximate level, and the confidence is very low.
[0160] Similarly, the experimental results in Table 3 show that the confidence of XGB and RF is higher than that of DT. Since they are ensemble learning models based on decision trees, they have higher credibility. However, the performance of the BPSO-XGB model and BPSO-RF model after BPSO optimization is better than the original model. Figure 5As shown in (g), the BPSO-XGB model identifies some level 6 as level 5 or level 7, accounting for 18.09% (level 5) and 26.6% (level 7), respectively. According to the recommended confidence, it is feasible to set speed level 5 or 7 when level 6 is used for tunneling. To a certain extent, the present invention believes that the confidence of the BPSO-XGB model for level 6 is 72.34%, and the confidence of the BPSO-XGB model for levels 5, 9 and 10 is 86.91%, 92.59% and 84.44%, respectively. For most speed levels, the prediction confidence of the BPSO-XGB model is better than that of the PSO-XGB model.
[0161] In addition, the confidence of BPSO-optimized RF is higher than that of the original RF model at prediction levels 7, 8, 9, 11, and 12. However, only the confidence of level 8 is higher than that of other models. The confidence of other levels is lower than that of BPSO-XGB. Although the original samples are not clearly distinguished, the BPSO-XGB model has the highest prediction confidence for levels 3, 4, 5, 9, 10, 11, and 12. The comprehensive analysis of confusion matrix and confidence shows that the machine learning model optimized by BPSO is better than the unoptimized model.
[0162] The experimental results show that the BPSO algorithm can find hyperparameters well when training machine learning models. Although the accuracy of the model of the present invention is a bit low for a certain level, the output is close to the true value. The credibility of the model based on BPSO of the present invention is very high. Therefore, the proposed BPSO-XGB model can be applied to engineering projects.
[0163] Taking the prediction of the speed of a shield screw conveyor as an example, this paper proposes a machine learning model construction method based on the BAS-PSO algorithm, which is used for the speed control and prediction of the shield screw conveyor, improves the intelligence level of shield construction, and improves the rationality of tunneling parameter setting. However, the model proposed in this paper is not limited to the speed control of the shield screw conveyor, and has certain applicability to the control and prediction of other tunneling parameters of the shield machine.
[0164] (3) Time-consuming analysis of model output
[0165] In order to fully compare the performance of different models, we compared the time required for prediction. In this experiment, different amounts of input data to be predicted were fed into the model to compare the computation time.
[0166] Figure 6The time required for different models to make predictions is shown. As the amount of input data to be predicted increases, the time consumed by all models increases. Decision trees take less time to compute the output, while support vector machines (SVMs) take the most time to compute the results. The hybrid model based on random forest (RF) takes less time than the model based on XGBoost. This is because the model based on XGBoost is more complex than the model based on RF. Random forests consist of several independent weak evaluators in parallel. When computing the output, the result of each weak evaluator is calculated separately. However, XGBoost iteratively increases the number of weak evaluators during the modeling process, which increases the complexity. Therefore, the model based on XGBoost takes longer to compute the output. However, the RF model optimized with particle swarm optimization (PSO) or binary particle swarm optimization (BPSO) takes about the same time as the original RF model. Similarly, the XGBoost model optimized with PSO or BPSO takes about the same time as the original XGBoost. Because our hybrid model improves the performance by optimizing the hyperparameters of the base model, it does not overly affect the model itself. The speed adjustment is not real-time, and the control system on the TBM itself has a lag. Therefore, when BPSO-XGBoost is applied to predict speed, the prediction accuracy of the model is more important than the prediction time. Although the BPSO-XGBoost model takes more time, the prediction time of the BPSO-XGBoost model is at the millisecond level, which is very valuable for engineering applications.
[0167] (4) Convergence test of BPSO model
[0168] In order to test the performance of BPSO and PSO when used to find hyperparameters for machine learning models, several experiments were conducted to analyze the efficiency of BPSO and the original PSO algorithm.
[0169] Figure 7 (a) and (b) show the iteration process of the PSO-based model and the BPSO-based model, and the parameters used are shown in Table 3. These parameters meet the convergence condition (36). In the iteration process of XGBoost, the BPSO algorithm stabilizes at the 37th step, while the PSO algorithm requires more iterations. In the iteration process of RF, the BPSO algorithm stabilizes at the 19th step, while the PSO algorithm stabilizes at the 44th step. In addition, the model optimized by the BPSO algorithm has higher accuracy.
[0170] We reselected the parameters to further analyze the impact on the modeling process. Let w = 0.1, c1 = 2, c2 = 2. These parameter combinations meet the convergence condition (35). Figure 8The iterative process using these combinations is shown. The BPSO algorithm stabilizes at step 26, while the PSO algorithm requires more iterations. Similar conclusions can be drawn when building the RF model. The BPSO algorithm increases the randomness of individual particles and improves the search capability. Figure 7 We show that our BPSO algorithm can search for hyperparameters for machine learning models faster.
[0171] We modified the value of the inertia weight w. Let w = 1, c1 = 2, c2 = 2. These parameters are common combinations in traditional PSO, but the combination does not meet the convergence conditions of BPSO. Fig. 9 (a)(b) show the iteration curves. The BPSO-based model no longer changes at the 9th iteration because of the divergence of particles. In subsequent iterations, particles are restricted by the velocity boundary and cannot be further iterated. Since this combination is empirically used in the original PSO, the PSO-based model can still be used to search for hyperparameters.
[0172] All experiments show that BPSO can be applied to find hyperparameters of machine learning models. The search efficiency of BPSO is higher than that of original PSO. However, the initial parameters of BPSO are not arbitrary. When the combination of initial parameters meets the convergence condition, stable search performance can be guaranteed.
[0173] The above description is only a description of the preferred embodiments of the present application, and is not intended to limit the scope of the present application. Any changes or modifications made by any person skilled in the art based on the above disclosed technical contents shall be deemed as equivalent effective embodiments and shall fall within the scope of protection of the technical solution of the present application.
Claims
1. A method for predicting the speed of a shield screw conveyor based on a hybrid particle swarm of longicorns and an XGBoost model, characterized in that: The following steps are involved: Step 1: Delete the 0 value and remove all data with a shield screw conveyor speed level of 0 from the shield machine data set; Step 2: Missing value processing, using linear interpolation to fill in missing values in the original data; Step 3: Outlier processing: outlier processing based on speed constraint repair; Step 4: Feature selection, select the features with the highest correlation with the label through construction experience and chi-square filtering method; Step 5: Construct training samples and normalize sample data, dividing the original data set into training set, validation set and test set; Step 6: Construct a hybrid model of BAS-PSO-XGBoost for predicting the speed of shield screw conveyor; Step 7, use the training samples in step 5 to train the BAS-PSO-XGBoost hybrid model; Step 8, obtaining the real-time status data of the shield machine, using the prediction model obtained in step 7 to obtain the prediction data of the screw conveyor speed for the shield screw conveyor speed control.
2. According to claim 1, a method for predicting the speed of a shield screw conveyor based on a hybrid particle swarm of longicorns and an XGBoost model is characterized in that: In step 2, Use linear interpolation to fill in the missing values in the original data, and use the two points (x0, t0) and (x1, t1) adjacent to the missing point to calculate the approximate value of the missing point (x, t), as shown in the following formula:
3. According to claim 1, a method for predicting the speed of a shield screw conveyor based on a hybrid particle swarm of longicorns and an XGBoost model, characterized in that: In step 3, The speed constraint-based repair method is used to handle outliers. Specifically, the rate of change of two values is limited to a certain range: In the above formula, speed constraint s=(s min ,s max ) is selected based on the construction organization plan and the inherent parameters of the shield machine. The constraint range that cannot be directly selected is selected according to the 3σ principle of the characteristic statistics of each dimension; x i and x j It is the value of two adjacent timestamps in a column of data; The repair process of this method is to define a cleaning window and check whether a data point and its adjacent data in the window meet the speed constraint conditions one by one: for values that do not meet the constraint conditions, the repair is completed according to the speed constraint conditions of its previous moment value and the next moment value; variables that are not convenient to determine the speed constraint range, or data that does not have inertial characteristics, are filtered according to the threshold set by the construction standard.
4. According to claim 1, a method for predicting the speed of a shield screw conveyor based on a hybrid particle swarm of longicorns and an XGBoost model, characterized in that: In step 4, Firstly, through construction experience, according to the construction organization plan and the experience of shield drivers and experts, some features are obviously considered to be irrelevant to the setting of the shield screw conveyor speed, so these features are eliminated; After the initial selection of features by empirical method, there are still many features that may be related to the speed of the shield screw conveyor. The chi-square filtering method is used to further select features. The chi-square filtering method is specifically used for discrete label sets. It calculates the chi-square statistic between each feature and the label, and ranks the features from high to low according to the chi-square statistic. The feature with the highest correlation with the label is finally selected.
5. According to claim 4, a method for predicting the speed of a shield screw conveyor based on a hybrid particle swarm of longicorns and an XGBoost model is characterized in that: In step 4, the selected features are as follows: Soil pressure at the rear end of the screw conveyor, total thrust, horizontal angle, lower right soil bin pressure, cutter disc torque, rear end vertical deviation, penetration, thrust speed, upper right soil bin pressure, right soil bin pressure, upper soil bin pressure, lower left soil bin pressure, left soil bin pressure, upper left soil bin pressure, horizontal hinge angle, lower soil bin pressure, screw conveyor pressure, screw conveyor torque, screw conveyor front pressure, vertical deviation at the front end, left thrust, cutter disc speed, upper thrust, right cylinder stroke, upper cylinder stroke, lower cylinder stroke, right thrust, left cylinder stroke, lower thrust, vertical intersection angle.
6. According to claim 1, a method for predicting the speed of a shield screw conveyor based on a hybrid particle swarm of longicorns and an XGBoost model, characterized in that: In step 6, five XGBoost model hyperparameters are selected as the optimization targets of the BAS-PSO algorithm as follows: Learning rate, which determines the contribution of the model to the new weak learner in each iteration. When selecting this parameter, it is necessary to consider the convergence speed of the algorithm and the accuracy of the model; The hyperparameter gamma is a parameter used to control the interaction between weak learners and the complexity of the model; The hyperparameter reg_alpha is a parameter used to control the weight of the model for L1 penalty. It prevents the model from overfitting by adding a regular term in the objective function. The hyperparameter subsample controls the proportion of random sampling for each tree, which is used to improve the generalization of the model; The hyperparameter colsample_bytree controls the ratio of column sampling for features used to generate each tree, which is used to improve the generalization of the model.
7. According to claim 1, a method for predicting the speed of a shield screw conveyor based on a hybrid particle swarm of longicorns and an XGBoost model, characterized in that: Step 7 includes the following steps: Step 7.1: Determine the parameters of the BAS-PSO hybrid model, including the number of particles N, the dimension of each particle D, the maximum number of iterations k, the local learning factor c1, the global learning factor c2, the inertia weight w; the initial step size step of the local search and the step size attenuation ratio st; Step 7.2: Determine the maximum number of iterations k; Step 7.3: Randomly initialize the initial positions and velocity directions of N particles; Step 7.4: Run the XGBoost model using the training set and validation set divided in the preparation work to calculate the fitness value of the particle; Step 7.5: Update the particle velocity using equation (1); in, is the d-th component of the velocity of particle i at the k-th iteration; is the d-th dimension component of the position of particle i at the k-th iteration; c1, c2 are acceleration constants used to adjust the update step size; r1, r2 are random numbers with values of [0,1], used to increase the randomness during the search; w is the inertia weight, used to adjust the search range of the solution space; pbest i =(p i1 ,p i2 ,...,p id ), is the historical optimal position of each particle, gbest=(g1,g2,...,g d ), record the historical optimal position of the particle group; Step 7.6: Update the local search step of the particle using equation (4); step k =step k-1 / st (4) Among them, step k is the local search step size when the particle is updated at the kth iteration; Step 7.7: Use equation (5) to solve the left and right search point positions of the particle; Step 7.8: Calculate the fitness values Fleft and Fright of the two search points, compare and save the better one as the fitness of the particle; Step 7.9: Calculate the local adjusted position of the particle using equation (3); Step 7.10: Calculate the new position of the particle using equation (2); Step 7.11: For each particle, compare its fitness value with the individual historical best fitness pbest. If the current value is smaller, update pbest. Step 7.12: For each particle, compare its fitness value with the global best fitness gbest. If the current value is smaller, update gbest. Step 7.13: Determine whether the number of iterations is met. If it is met, exit gbest and obtain the left-middle solution. If it is not met, return to step 7.
5. Step 7.14: Use the test set to evaluate the performance of the prediction model.
8. According to claim 7, a method for predicting the speed of a shield screw conveyor based on a hybrid particle swarm of longicorns and an XGBoost model is characterized in that: The number of particles N is 50, the constants c1 and c2 are 2, the inertia coefficient w is 0.9, the iteration ratio μ is 0.9, and the iteration step step is 1.
3.
9. According to claim 7, a method for predicting the speed of a shield screw conveyor based on a hybrid particle swarm of longicorns and an XGBoost model, characterized in that: k is taken as 50.
Citation Information
Cited By
Rotating speed matching method and system for super-large-diameter slurry shield short screw conveyor and storage medium
CN122021469A