Prediction method based on PSO-ADGM-SVR combined model
The ADGM and SVR model combination optimized by the particle swarm algorithm, combined with trend and random characteristics, solves the problem of insufficient generalization ability of traditional time series prediction models under complexity and uncertainty, achieving higher prediction accuracy and Adaptability.
Patent Information
- Application Number
- CN202410687115.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-05-30
AI Technical Summary
Traditional time series prediction models have insufficient generalization capabilities in the face of complexity and uncertainty, making it difficult to effectively solve problems in actual projects. In particular, the prediction accuracy of traditional gray models is not high.
A prediction method based on the PSO-ADGM-SVR combination model is adopted, and the ADGM and SVR models are optimized through the particle swarm algorithm. The trend characteristics of ADGM and the random characteristics of SVR are combined, and the weight vector weighted combination is used to improve the prediction accuracy.
It improves the prediction accuracy and adaptability of the model, enhances the prediction ability of complex time series data, and is better than the performance of a single model.
Smart Images

Figure CN118690130A
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of data mining, and in particular relates to a prediction method based on a PSO-ADGM-SVR combined model. Background Art
[0002] Time series prediction is widely used in various fields. Time series data is time series data. Among many data, time series data is an important and complex data type. It refers to data arranged in chronological order and has strong time correlation. Time series data prediction is the process of using historical data to predict future values. It has a wide range of applications in many fields. When performing time series prediction, the following key steps are involved: Data collection: Collect time-related data series, which are usually a series of data points arranged in chronological order, including temperature records, sensor data, etc.; Data preprocessing: In order to ensure the quality of data and the accuracy of prediction results, it is necessary to process missing values in the data series, check and process outliers. Data analysis: Perform trend analysis, seasonal analysis, and periodic analysis, calculate the autocorrelation function (ACF) and partial autocorrelation function (PACF), and provide a basis for selecting a prediction model. Model selection: Select a prediction model based on data characteristics. Divide the data set: Divide the data set into a training set and a test set so that it can be evaluated after training the model. Model training: Use the training set to train the selected time prediction prediction model. Model evaluation: The prediction performance of the model is evaluated through the test set data. Common evaluation indicators include mean square error (MSE) and mean absolute error (MAE).
[0003] Commonly used time series prediction models include: grey model, ARIMA model, regression prediction method, machine learning method, etc. These prediction models each have their own advantages and disadvantages and scope of application, and their forms and methods are fixed and deterministic.
[0004] However, the prediction accuracy of the traditional grey model is not high, and the above models have good prediction effects for a specific type of data, but their generalization ability is insufficient, making it difficult to effectively solve problems caused by complexity and uncertainty in actual engineering. Summary of the invention
[0005] In order to solve the above problems in the prior art, the present invention adopts a prediction method based on a PSO-ADGM-SVR combination model, wherein the PSO-ADGM-SVR combination model includes: a PSO-ADGM model and a PSO-SVR model; the prediction method includes:
[0006] S1. Collect the most recent historical slope displacement data and pre-process it;
[0007] S2, input the preprocessed data into the optimized PSO-ADGM model to obtain the PSO-ADGM prediction results;
[0008] S3, input the preprocessed data into the optimized PSO-SVR model to obtain the PSO-SVR prediction results;
[0009] S4. Calculate the weight vector and use the weight vector to perform a weighted combination of the PSO-ADGM prediction results and the PSO-SVR prediction results to obtain the slope displacement predicted by the combined model; among them, ADGM is the neighboring cumulative discrete gray model, SVR is the support vector regression machine, and PSO is the particle swarm algorithm.
[0010] The optimization process of the PSO-ADGM model includes: obtaining slope displacement training samples, constructing the ADGM (1, 1) model, calculating the prediction value expression of the ADGM (1, 1) model, determining the parameters of the ADGM (1, 1) model according to the prediction value expression of the ADGM (1, 1) model, optimizing the parameters of the ADGM (1, 1) model using the POS algorithm according to the slope displacement training samples, obtaining the optimal parameter values, using the optimal parameter values as the parameters of the ADGM (1, 1) model, and obtaining the optimized PSO-ADGM model.
[0011] Constructing the ADGM (1, 1) model includes: constructing the original sequence X (0) , perform neighbor accumulation on the original sequence to generate a new sequence X (1) , construct the adjacent cumulative discrete grey model ADGM(1,1) according to the new sequence: x (1) (k+1)=β 1 x (1) (k)+β 2 ; where x (1) (k) is the kth data of the new sequence, β 1 and β 2 as a parameter.
[0012] The expression for calculating the predicted value of the ADGM(1,1) model includes:
[0013] According to the sequence X (1) The least squares method is used to solve the ADGM (1, 1) model and obtain the parameter β 1 and β 2 The value of the estimate is the parameter β 1 and β 2 The estimated value is added to the ADGM(1,1) model for recursion to obtain the time response expression of the ADGM(1,1) model:
[0014]
[0015] The time response expression of the ADGM(1,1) model is reduced by cumulative reduction to obtain the predicted value expression of the ADGM(1,1) model:
[0016]
[0017] Among them, x (1) (k) is the kth data of the new sequence, x (0) (k+1) is the k+1th data of the original sequence, is the k-th predicted value of the cumulative reduction, is the k+1th data of the predicted new sequence, is the parameter β of the kth dimension 1 , n is the length of the original sequence.
[0018] The optimization process of the PSO-SVR model includes: obtaining slope displacement training samples, obtaining the original SVR model, and determining the parameters of the original SVR model; optimizing the parameters of the original SVR model using the POS algorithm based on the slope displacement training samples to obtain the optimal parameter values, using the optimal parameter values as the parameters of the original SVR model, and obtaining the optimized PSO-SVR model.
[0019] The kernel function of the SVR model is a Gaussian radial basis kernel function.
[0020] Calculating the weight vector includes:
[0021] S41, obtaining historical slope displacement data and preprocessing it;
[0022] S42, inputting the preprocessed data into the optimized PSO-ADGM model to obtain the PSO-ADGM prediction result;
[0023] S43, inputting the preprocessed data into the optimized PSO-SVR model to obtain the PSO-SVR prediction result;
[0024] S44. Construct an objective function according to the PSO-ADGM prediction results and the PSO-SVR prediction results, solve the objective function, and obtain a weight vector.
[0025] The objective function is:
[0026] minJ=minKEK T
[0027]
[0028] K=[k 1 ,k 2 ]
[0029] Among them, K is the weight vector, k1 , k 2 are the weights of the PSO-ADGM model and the PSO-SVR model respectively, E is the error matrix, and R is the unit vector.
[0030] The error matrix is:
[0031]
[0032] in, Represents the true label y and the prediction result of the i-th model of error.
[0033] Solving the objective function includes: solving the objective function using the Lagrange multiplier method to obtain the optimal solution of the weight vector:
[0034]
[0035] Among them, K 0 is the optimal solution for the weight vector.
[0036] Beneficial effects:
[0037] 1. The neighboring cumulative grey prediction model (ADGM) can explore the trend characteristics of time series data, and the support vector regression machine (SVR) model can reflect the random characteristics of time series data. The two have certain complementarity. Therefore, the present invention selects ADGM and SVR models as a single prediction model, and uses weights to couple the ADGM and SVR models to obtain a PSO-ADGM-SVR combined model, thereby improving the prediction accuracy of the model; 2. On the basis of the traditional grey prediction model, the present invention uses the neighboring cumulative grey sequence operator to improve the traditional grey sequence generation method according to the new information priority principle, so that the model is more adapted to the development law of things themselves and improves the prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 A flowchart of a prediction method based on a PSO-ADGM-SVR combined model provided by an embodiment of the present invention;
[0039] Figure 2 A flowchart of the optimization process of the PSO-ADGM model provided by an embodiment of the present invention;
[0040] Figure 3 A flowchart of the optimization process of the PSO-SVR model provided by an embodiment of the present invention;
[0041] Figure 4 A schematic diagram of the prediction results of the PSO-ADGM model provided in an embodiment of the present invention;
[0042] Figure 5A schematic diagram of the prediction results of the PSO-SVR model provided in an embodiment of the present invention;
[0043] Figure 6 A schematic diagram of the prediction results of the PSO-ADGM-SVR combination model provided in an embodiment of the present invention;
[0044] Figure 7 A comparison chart of prediction results of different models provided in an embodiment of the present invention;
[0045] Figure 8 A comparison chart of evaluation indicators of different models provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] like Figure 1 As shown, the PSO-ADGM-SVR combination model includes: PSO-ADGM model and PSO-SVR model; the prediction method includes:
[0048] S1. Collect the most recent historical slope displacement data and perform preprocessing;
[0049] S2, input the preprocessed data into the optimized PSO-ADGM model to obtain the PSO-ADGM prediction results;
[0050] like Figure 2 As shown in FIG. 1 , the optimization process of the PSO-ADGM model includes: obtaining a slope displacement data set, dividing the data set into a training set and a test set; constructing an ADGM (1,1) model, calculating a predicted value expression of the ADGM (1,1) model, determining the parameters of the ADGM (1,1) model according to the predicted value expression of the ADGM (1,1) model, optimizing the parameters of the ADGM (1,1) model using the POS algorithm according to the training set, obtaining the optimal parameter values, using the optimal parameter values as the parameters of the ADGM (1,1) model, and obtaining the optimized PSO-ADGM model; and using the test set to verify the prediction results of the optimized PSO-ADGM model.
[0051] The neighboring cumulative grey prediction model ADGM (1,1) is a time series prediction method suitable for small samples and incomplete information. It can predict future development trends. It is based on the traditional grey prediction model and uses the neighboring cumulative grey sequence operator to improve the traditional grey sequence generation method according to the new information priority principle.
[0052] The construction of PSO-ADGM model includes: the original sequence is X (0) =(x (0) (1),x (0) (2),…,x (0) (n)), using the original sequence X (0) Perform neighbor accumulation to obtain the neighbor accumulation generation sequence X (1) =(x (1) (1),x (1) (2),…,x (1) (n)), the implementation method of neighbor accumulation is shown in formula (1). In the formula, γ is defined as the neighbor accumulation coefficient, which is used to adjust the weight of historical information in the process of grey sequence generation, and its value range is (-1,1).
[0053]
[0054] The grey model generated by neighbor accumulation is called neighbor accumulation discrete grey model ADGM(1,1):
[0055] x (1) (k+1)=β 1 x (1) (k)+β 2 (2)
[0056] Generate sequence X based on neighbor accumulation (1) The least square method is used to solve the neighboring cumulative discrete grey model ADGM(1,1) to achieve the parameter β 1 and β 2 Estimated value:
[0057] [β 1 ,β 2 ] T =(B T B) -1 B T Y (3)
[0058]
[0059] Find β 1 and β 2 After the estimated value of is substituted into (2) for recursion, the time response expression of the neighboring cumulative discrete model is obtained:
[0060]
[0061] The time response expression of the adjacent cumulative discrete model is reduced by cumulative reduction to obtain the predicted value expression of the ADGM (1,1) model:
[0062]
[0063] Among them, x (1) (k) is the kth data of the new sequence, x (0) (k+1) is the k+1th data of the original sequence, is the kth predicted value of the original sequence after cumulative reduction. is the k+1th data of the predicted new sequence, is the parameter β of the kth dimension 1 , n is the length of the original sequence.
[0064] The fitness function of the POS algorithm is the average relative error between the predicted results and the actual results of the training set. Taking the minimum average relative error as the goal, the optimal value of the neighboring accumulation coefficient γ of ADGM(1,1) is determined; in the PSO-ADGM model, the optimal model parameter is γ=0.0149.
[0065] S3, input the preprocessed data into the optimized PSO-SVR model to obtain the PSO-SVR prediction results;
[0066] like Figure 3 As shown in FIG, the optimization process of the PSO-SVR model includes: obtaining slope displacement training samples, obtaining the original SVR model, and determining the parameters of the original SVR model; optimizing the parameters of the original SVR model using the POS algorithm according to the slope displacement data to obtain the optimal parameter values, and using the optimal parameter values as the parameters of the original SVR model to obtain the optimized PSO-SVR model.
[0067] Training sample D = {(x 1 ,y 1 ),(x 2 ,y 2 ),…,(x n ,y n )},y i ∈R, n is the number of training samples, x i is the historical slope displacement, including slope displacement collected in multiple time periods, y i is the slope displacement collected in the following time period.
[0068] For nonlinear regression problems, support vector regression (SVR) can use kernel functions to map input data into high-dimensional space, use linear regression algorithms to find an optimal hyperplane, transform nonlinear regression problems into linear regression problems, and obtain the final regression function:
[0069]
[0070] Among them, α i is the Lagrange multiplier, is the Lagrange multiplier of the dual problem, b is an undetermined constant, K(x i .x) is a kernel function. Kernel functions of different forms will have different effects on the prediction results. The present invention selects a Gaussian radial basis kernel function (RBF) with a simple structure, fewer unknown parameters and certain generalizability, which is defined as follows:
[0071] K(x i ,x j ) = exp(-‖x i -x j ‖ 2 / σ 2 ) (10)
[0072] Among them, σ is the kernel function parameter, and its value can have a significant impact on the final prediction result. The value of the kernel function parameter is usually determined by trial and error, empirical selection, cross-validation and other methods. The subjective factors involved in this process will affect the accuracy of SVR.
[0073] In the SVR model, the role of the penalty factor C is to control the fitting accuracy of the model. Adjusting the value of C can effectively avoid overfitting and underfitting of the model. Considering the characteristics of the particle swarm optimization algorithm, which has strong global search ability, fast convergence speed and easy implementation, the present invention uses the algorithm to optimize the kernel function parameter σ and the penalty factor C. The optimal parameter of C is 581.3069, and the optimal parameter of σ is 3.3785.
[0074] Specifically include:
[0075] Step 1: Determine the parameters of the SVR model, including the penalty factor C and the kernel function parameter σ.
[0076] Step 2: Construct the fitness function of the particle swarm algorithm; in SVR prediction, the mean square error (MSE) or root mean square error (RMSE) between the predicted results and the true results is usually used as the fitness function.
[0077] Step 3, initialize the position and velocity of the particle swarm; each particle represents a set of parameters, the position represents the value of the parameter, and the velocity represents the direction and rate of change of the parameter; during initialization, a group of particles can be randomly generated, and their positions and velocities can be randomly assigned within the parameter range.
[0078] Step 4: Calculate the fitness function value of each particle according to the training sample, and obtain the position of the local optimal particle and the position of the global optimal particle of each particle according to the fitness function value; the local optimal particle is the particle corresponding to the historical maximum fitness function value of the particle, and the global optimal particle is the particle with the largest fitness function value in the particle swarm.
[0079] Step 5: Update the speed and position of each particle according to the position of the local optimal particle of each particle and the position of the global optimal particle;
[0080] Step 6: Repeat steps 4 and 5 until the maximum number of iterations is reached or the fitness function value meets the set threshold, and the position of the global optimal particle is obtained, and the position of the global optimal particle is used as the optimal parameter of the SVR model.
[0081] The process of optimizing the neighboring accumulation coefficient γ of the neighboring accumulation grey prediction model using the POS algorithm is similar to the above process.
[0082] S4. Calculate the weight vector, and use the weight vector to perform a weighted combination of the PSO-ADGM prediction results and the PSO-SVR prediction results to obtain the combined model prediction results:
[0083]
[0084] in, is the prediction result of PSO-ADGM, This is the prediction result of PSO-SVR.
[0085] Reasonable allocation of weights of each single model is one of the key factors affecting the prediction accuracy of the combined model. Commonly used weighting methods include: arithmetic mean method, binomial coefficient method, and inverse mean square error method. These methods are simple in form but lack applicability. Therefore, the present invention adopts the optimal weighted combination method based on minimum error.
[0086] Calculating the weight vector includes: obtaining historical data of slope displacement and preprocessing it; inputting the preprocessed data into the optimized PSO-ADGM model and PSO-SVR model to obtain PSO-ADGM prediction results and PSO-SVR prediction results respectively; constructing an objective function according to the PSO-ADGM prediction results and the PSO-SVR prediction results, solving the objective function, and obtaining an optimal weight vector; wherein, in one embodiment, the historical data of slope displacement in the first 28 periods is used as a training sample, and the slope displacement data in the last 5 periods is predicted, and the optimal weight vector obtained is: k 1 =0.6072, k 2 =0.3928.
[0087] The optimal weight refers to the process of obtaining the value of each weight in the combined model by constructing an objective function and solving it with the minimum error or maximum accuracy as the constraint after the weight is normalized.
[0088]
[0089] The present invention takes the sum of squares of the errors between the predicted value and the measured value as the objective function and obtains the optimal weight by minimizing the function. Assuming that the final prediction result is obtained by combining m single prediction models, the prediction result of the i-th single model at time t is y t is the actual data at time t, and the prediction result of the combined model is:
[0090]
[0091] The prediction error of the combined model is:
[0092]
[0093] Among them, e it is the prediction error of the ith model at time t.
[0094] Error sum of squares:
[0095]
[0096] At this time, the error matrix of the system can be defined as:
[0097]
[0098] K=[k 1 ,k 2 ,…,k m ] (16)
[0099] Therefore, the objective function is:
[0100] minJ=minKEK T (17)
[0101]
[0102] The optimal solution of the weight vector is obtained by using the Lagrange multiplier method:
[0103]
[0104] Figure 4 and Figure 5 are the predictions of two single models, Figure 6 is the prediction result of the PSO-ADGM-SVR combined prediction model, Figure 7 This is a comparison chart of the prediction results of different models. Figure 8 As shown, the present invention uses the mean relative error MRE, root mean square error RMSE, and determination coefficient R 2 , to evaluate the prediction effect of the model; the lower the mean relative error MRE and root mean square error RMSE values, the better the prediction effect, and the coefficient of determination R 2 The closer it is to 1, the better the model prediction effect is. Figure 4 , Figure 5 , Figure 6 , Figure 7 , Figure 8 It can be seen that the effect of the PSO-ADGM-SVR combined prediction model is better than that of a single model.
[0105] The above embodiments further illustrate the purpose, technical solutions and advantages of the present invention in detail. It should be understood that the above embodiments are only preferred implementation modes of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made to the present invention within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A prediction method based on PSO-ADGM-SVR combined model, It is characterized in that The PSO-ADGM-SVR combination model includes: PSO-ADGM model and PSO-SVR model; the prediction methods include: S1. Collect the most recent historical slope displacement data and pre-process it; S2, input the preprocessed data into the optimized PSO-ADGM model to obtain the PSO-ADGM prediction results; S3, input the preprocessed data into the optimized PSO-SVR model to obtain the PSO-SVR prediction results; S4. Calculate the weight vector and use the weight vector to perform a weighted combination of the PSO-ADGM prediction results and the PSO-SVR prediction results to obtain the slope displacement predicted by the combined model; among them, ADGM is the neighboring cumulative discrete gray model, SVR is the support vector regression machine, and PSO is the particle swarm algorithm.
2. A prediction method based on the PSO-ADGM-SVR combined model according to claim 1, It is characterized in that The optimization process of the PSO-ADGM model includes: obtaining slope displacement training samples, constructing the ADGM (1,1) model, calculating the prediction value expression of the ADGM (1,1) model, determining the parameters of the ADGM (1,1) model according to the prediction value expression of the ADGM (1,1) model, optimizing the parameters of the ADGM (1,1) model using the POS algorithm according to the slope displacement training samples, obtaining the optimal parameter values, using the optimal parameter values as the parameters of the ADGM (1,1) model, and obtaining the optimized PSO-ADGM model.
3. A prediction method based on the PSO-ADGM-SVR combined model according to claim 2, It is characterized in that Constructing the ADGM(1,1) model includes: constructing the original sequence X (0) , perform neighbor accumulation on the original sequence to generate a new sequence X (1) , construct the adjacent cumulative discrete grey model ADGM(1,1) according to the new sequence: x (1) (k+1)=β 1 x (1) (k)+β 2 ; where x (1) (k) is the kth data of the new sequence, β 1 and β 2 as a parameter.
4. A prediction method based on the PSO-ADGM-SVR combined model according to claim 3, It is characterized in that The expression for calculating the predicted value of the ADGM(1,1) model includes: According to the sequence X (1) The ADGM(1,1) model is solved using the least squares method to obtain the parameter β 1 and β 2 The value of the estimate is 1 and β 2 The estimated value is added to the ADGM(1,1) model for recursion, and the time response expression of the ADGM(1,1) model is obtained: The time response expression of the ADGM(1,1) model is reduced by cumulative reduction to obtain the predicted value expression of the ADGM(1,1) model: Among them, x (1) (k) is the kth data of the new sequence, x (0) (k+1) is the k+1th data of the original sequence, is the k-th predicted value of the cumulative reduction, is the k+1th data of the predicted new sequence, is the parameter β of the kth dimension 1 , n is the length of the original sequence.
5. A prediction method based on the PSO-ADGM-SVR combined model according to claim 1, It is characterized in that The optimization process of the PSO-SVR model includes: obtaining slope displacement training samples, obtaining the original SVR model, and determining the parameters of the original SVR model; optimizing the parameters of the original SVR model using the POS algorithm based on the slope displacement training samples to obtain the optimal parameter values, using the optimal parameter values as the parameters of the original SVR model, and obtaining the optimized PSO-SVR model.
6. A prediction method based on the PSO-ADGM-SVR combined model according to claim 5, It is characterized in that The kernel function of the SVR model is a Gaussian radial basis kernel function.
7. A prediction method based on the PSO-ADGM-SVR combined model according to claim 1, It is characterized in that Calculating the weight vector includes: S41, obtaining historical slope displacement data and preprocessing it; S42, inputting the preprocessed data into the optimized PSO-ADGM model to obtain the PSO-ADGM prediction result; S43, inputting the preprocessed data into the optimized PSO-SVR model to obtain the PSO-SVR prediction result; S44. Construct an objective function according to the PSO-ADGM prediction results and the PSO-SVR prediction results, solve the objective function, and obtain a weight vector.
8. A prediction method based on the PSO-ADGM-SVR combined model according to claim 7, It is characterized in that The objective function is: minJ=minKEK T K=[k 1 ,k 2 ] Among them, K is the weight vector, k 1 , k 2 are the weights of the PSO-ADGM model and the PSO-SVR model respectively, E is the error matrix, and R is the unit vector.
9. A prediction method based on the PSO-ADGM-SVR combined model according to claim 8, It is characterized in that The error matrix is: in, Represents the true label y and the prediction result of the i-th model of error.
10. A prediction method based on the PSO-ADGM-SVR combined model according to claim 9, It is characterized in that Solving the objective function includes: solving the objective function using the Lagrange multiplier method to obtain the optimal solution of the weight vector: Among them, K 0 is the optimal solution for the weight vector.
Citation Information
Patent Citations
Method for predicting fault of electromechanical device based on combined prediction model
CN102937534A
A pile top displacement nonlinear prediction method considering sliding bed rock mass structure characteristics
CN109711051A
Landslide displacement high-precision prediction method based on machine learning
CN112926251A
Prediction method and system of high slope deformation
US20210049515A1
Cited By
Railway roadbed settlement prediction method based on IGM-PSVR model
CN119312692A
Machine learning method and system for dry-type transformer manufacturing process optimization
CN120706226A
