A steel product demand quantity prediction method based on SARIMA-LSSVM
Patent Information
- Application Number
- CN202311107565.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-30
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2043-08-30
AI Technical Summary
作为一种统计模型,它假设时间序列数据成分中存在线性模式,故而存在对数据中隐藏的非线性模式提取不足的缺陷;SARIMA模型的参数优化问题本质上是一个多目标问题,然而,现有研究仅将SARIMA模型精度视为唯一的优化目标,存在单一精度目标难以提高模型泛化能力并无法防止模型过拟合的问题,且现有研究使用所有样本数据训练SARIMA模型的计算成本较高
[0049] The beneficial effects of this invention are as follows: The steel product demand forecasting method based on SARIMA-LSSVM includes extracting steel product demand data and converting it into a time series; developing a SARIMA model based on MOIDE with a sparse strategy to extract the linear components in the demand data, obtaining a series of predicted values and corresponding residuals; using a DE-based LSSVM model to extract the nonlinear components in the residual data, obtaining corresponding predicted values; and finally, adding the two predicted values to obtain the final prediction result. This method integrates the advantages of SARIMA and LSSVM models, and considers the sparsity strategy of the model as well as the accuracy and complexity objectives of the model during the SARIMA parameter optimization process. It can fully capture the linear and nonlinear components hidden in the steel product demand data, improving the prediction accuracy of steel product demand while reducing computational costs.
Smart Images

Figure CN117273799B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of time series forecasting and analysis methods, and specifically relates to a method for forecasting steel product demand based on SARIMA-LSSVM. Background Technology
[0002] In China, steel companies primarily rely on futures orders from established customers, supplemented by spot orders from potential customers. Typically, spot orders (i.e., the potential demand for steel products in the spot market) account for about 5% of total orders. However, the profit margin for spot steel products is higher than that of futures products, and the added value of finished products is also higher than that of semi-finished products. Therefore, steel companies are increasingly focusing on the potential demand for finished products in the spot market. Accurately forecasting the potential demand for steel products is crucial for steel companies, providing vital support for production and inventory planning as well as raw material procurement. However, the uncertainty of potential customers and the inherent noise in the spot market make it difficult for steel companies to accurately determine the potential demand for steel products. Therefore, developing scientific demand forecasting methods to accurately predict the potential demand for steel products is essential for steel companies.
[0003] Seasonal Autoregressive Integrated Moving Average (SARIMA) is a common model for predicting seasonal time series, exhibiting high predictive accuracy in the short term. As a statistical model, it assumes the existence of linear patterns in the time series data, thus suffering from insufficient extraction of hidden nonlinear patterns. Parameter optimization in SARIMA is essentially a multi-objective problem; however, existing research treats SARIMA model accuracy as the sole optimization objective. This leads to the problem that a single accuracy objective is insufficient to improve model generalization ability and prevent overfitting. Furthermore, the computational cost of training SARIMA models using all sample data in existing studies is high. Summary of the Invention
[0004] In view of the shortcomings of the existing technology, the purpose of this invention is to provide a method for predicting the demand of steel products based on SARIMA-LSSVM.
[0005] The technical solution adopted in this invention is: a method for predicting the demand for steel products based on SARIMA-LSSVM, the key technical points of which include the following steps:
[0006] Step 1: Extract daily demand data for steel products in the spot market from the database and convert it into a time series Z-series data. t ;
[0007] Step 2: Fit the linear components of the steel product demand data using a SARIMA model with a sparse strategy based on the improved multi-objective differential evolution with improved mutation strategies (MOIDE) algorithm, thereby obtaining a series of predicted values. and the corresponding residual ε t ;
[0008] Step 2.1: Use the unit root test to check whether the time series of steel product demand is stationary; if yes, proceed to step 2.2; if no, perform the difference operation until the time series satisfies stationarity, thus obtaining SARIMA(p,d,q)(P,D,Q). s The model uses the conventional difference order d and the seasonal difference order D.
[0009] Step 2.2: Determine SARIMA(p,d,q)(P,D,Q) based on the fixed time intervals at which demand data repeatedly hit peaks and / or troughs in the time series graph of steel product demand. s The seasonal length s in the model;
[0010] Step 2.3: Determine SARIMA(p,d,q)(P,D,Q) based on the autocorrelation function plot, partial autocorrelation function plot, and the accuracy and complexity of the fitted model of the stationary time series. s The maximum value of the order p of the autoregressive (AR) component, the order q of the moving average (MA) component, the order P of the seasonal autoregressive (SAR) component, and the order Q of the seasonal moving average (SMA) component. max q max P max and Q max ;
[0011] Step 2.4: Set all SARIMA(p,d,q)(P,D,Q) according to the accuracy and complexity of the fitted model. s The parameters c and φ in the model p (p = 1, 2, ..., p) max ), θ q (q=1,2,...,q max ), Φ P (P = 1, 2, ..., P) max ) and Θ Q (Q = 1, 2, ..., Q)max The range of values for the corresponding sparse thresholds c′, φ′, θ′, Φ′ and Θ′;
[0012] Step 2.5: Combine the MOIDE algorithm and the sparsity strategy and apply them to the parameter estimation process of the SARIMA model. After one algorithm run, the optimal structure and optimal parameter value scheme of the SARIMA model are obtained simultaneously.
[0013] Step 2.6: Use the optimal SARIMA model obtained in Step 2.5 to perform rolling forecasts on the steel product demand data, and obtain the rolling forecast values for the demand time series. and the corresponding residual ε t ;
[0014] Step 2.7: Verify the validity of the SARIMA model: if yes, proceed to step 3; if no, proceed to step 2.2.
[0015] Step 3: Fit the residual data ε using a least squares support vector machine (LSSVM) model based on the differential evolution (DE) algorithm. t The nonlinear components in the data are used to obtain a series of predicted values.
[0016] Step 3.1: Transfer the residual data ε t Normalization is performed to obtain the training sample set;
[0017] Step 3.2: Set the regularization parameter γ, the weight a1 of the Gaussian kernel function, and the width σ of the Gaussian kernel based on the actual operating conditions. Gauss and polynomial kernel power series d ploy The range of values for;
[0018] Step 3.3: Obtain the optimal parameter values for the LSSVM model based on the DE algorithm;
[0019] Step 3.4: Use the optimal LSSVM model obtained in Step 3.3 to perform rolling prediction and denormalization on the normalized residual data to obtain the rolling predicted values of the residual data.
[0020] Step 3.5: Verify the validity of the hybrid model SARIMA-LSSVM: If yes, proceed to step 4; if no, proceed to step 3.2.
[0021] Step 4: and Add them together to get the final forecast of steel product demand.
[0022] In the above scheme, the specific method of step 2.5 is as follows:
[0023] Step 2.5.1: Initialize the parameter selection scheme population and MOIDE algorithm parameters. Set the population size of the parameter selection scheme to NP, the total number of parameters to be estimated in the scheme to M, the initial number of iterations G = 0, and the maximum number of iterations G max The mutation probability F of individual genes under candidate parameter value schemes, the crossover probability CR of individuals under different parameter value schemes, and the external archive set.
[0024] The method for generating the population of initial parameter value schemes using a random strategy is as follows:
[0025] To improve prediction accuracy and reduce computational cost, a parameter value scheme is designed where each individual contains an AR component with an order p not exceeding p. max The order q of the MA part does not exceed q max The order P of the SAR part does not exceed P max The order Q of the SMA part does not exceed Q max All SARIMA(p,d,q)(P,D,Q) s The parameter set of the model; all SARIMA(p,d,q)(P,D,Q) s The parameters c and φ in the model p θ q Φ P and Θ Q Encode sequentially to obtain a parameter value scheme for the MOIDE algorithm population, where p = 1, 2, ..., p max q = 1, 2, ..., q max P = 1, 2, ..., P max Q = 1, 2, ..., Q max ; Let the value scheme of the g-th parameter in the population be as follows but This represents the encoded value of the h-th parameter in the model, where g = 1, 2, ..., NP, h = 1, 2, ..., M; and the value scheme for each parameter. coded value Based on uniform distribution Generate, and Represent Upper and lower bounds of the value;
[0026] Step 2.5.2: Calculate the value scheme for each parameter in the population based on the sparsity strategy. The objective function fitness value is used to obtain the individual with the best parameter value scheme in the population;
[0027] Step 2.5.3: Execute G = G + 1. If G > G max If so, proceed to step 2.5.8; otherwise, proceed to step 2.5.4.
[0028] Step 2.5.4: For the value scheme of the g-th parameter Randomly select three distinct parameter value schemes (not equal to g) from the population, and combine these schemes to obtain the target scheme. Mutation scheme
[0029] Step 2.5.5: Combine scheme individuals with the same number and Perform cross operations on some elements to obtain individual solutions. Corresponding cross scheme individuals
[0030] Step 2.5.6: Calculate and compare parameter value schemes and The fitness value of the objective function is determined based on the merits of the proposed solutions. still It can become an individual in the next generation of candidate parameter value schemes;
[0031] Step 2.5.7: Update the external archive set Arch_set based on the dominance relationship between the candidate solution set and the individual solutions with parameter values in the external archive set;
[0032] Step 2.5.8: If the current iteration number G > G max If the algorithm fails, it stops running, outputs the optimal parameter values of the SARIMA model, and determines the optimal structure of the model; otherwise, it proceeds to step 2.5.3.
[0033] In the above scheme, the specific method of step 2.5.2 is as follows:
[0034] For each parameter value scheme The objective function is designed to be the accuracy and complexity of the SARIMA model, represented by the root mean square error and the number of non-zero parameters in the model, respectively; by minimizing (1) and (2), each... The fitness value, and the specific expressions of the objective functions (1) and (2) are:
[0035]
[0036]
[0037] wherein Z t and respectively represent the actual value and the predicted value of steel product demand data; is a 0-1 variable: represents is less than the corresponding set sparsity threshold; otherwise,
[0038] the specific method for determining model parameters and the objective function based on the sparsity strategy is:
[0039] in the parameter optimization process, if the value of the constant term in the SARIMA model satisfies |c|<c′, that is: set and otherwise, set if the parameter of the AR part in the model satisfies |φ p |<φ′, that is: | set and otherwise, set in other words, sample points with a parameter of 0 do not participate in the calculation of objective functions (1) and (2); performing the same operation to obtain the parameter θ of the MA part in the model q , that is: the parameter Φ of the SAR part P , that is: and the parameter Θ of the SMA part Q , that is: values and values of corresponding parameters of each part; obtaining the values of objective functions (1) and (2) based on the above operations.
[0040] in the above solution, the specific method of said step 3.3 is:
[0041] step 3.3.1: initializing a parameter value scheme population and algorithm parameters, setting the population size NP1 of parameter value schemes, the total number M1 of parameters to be estimated, the initial number of iterations G1=0, the maximum number of iterations the mutation probability F1 of individual genes of candidate parameter value schemes, and the crossover probability CR1 of individuals of different model parameter value schemes;
[0042] step 3.3.2: combining the definition domain of each parameter in the model, generating an initial parameter value scheme population by adopting a random strategy;
[0043] step 3.3.3: executing G1=G1+1, if then go to step 3.3.7; otherwise, go to step 3.3.4;
[0044] step 3.3.4: for the g1-th parameter value scheme individual The mutation strategy "DE / rand / 1" is used to generate mutated individuals corresponding to the given individual.
[0045] Step 3.3.5: Combine scheme individuals with the same number and Perform cross operations on some elements to obtain individual solutions. Corresponding cross scheme individuals
[0046] Step 3.3.6: Calculate and compare parameter value schemes. and The fitness value of the objective function is determined based on the merits of the proposed solutions. still It can become an individual in the next generation of candidate parameter value schemes;
[0047] Step 3.3.7: If the current iteration number is... If the algorithm stops running, the optimal parameter values for the LSSVM model are output; otherwise, proceed to step 3.3.3.
[0048] Step 3.3.8: Based on the optimal parameter values, use Gaussian elimination to obtain the parameters α and b of the LSSVM model.
[0049] The beneficial effects of this invention are as follows: The steel product demand forecasting method based on SARIMA-LSSVM includes extracting steel product demand data and converting it into a time series; developing a SARIMA model based on MOIDE with a sparse strategy to extract the linear components in the demand data, obtaining a series of predicted values and corresponding residuals; using a DE-based LSSVM model to extract the nonlinear components in the residual data, obtaining corresponding predicted values; and finally, adding the two predicted values to obtain the final prediction result. This method integrates the advantages of SARIMA and LSSVM models, and considers the sparsity strategy of the model as well as the accuracy and complexity objectives of the model during the SARIMA parameter optimization process. It can fully capture the linear and nonlinear components hidden in the steel product demand data, improving the prediction accuracy of steel product demand while reducing computational costs. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This is a flowchart of the steel product demand forecasting method based on SARIMA-LSSVM according to an embodiment of the present invention;
[0052] Figure 2 This is a schematic diagram of the MOIDE algorithm according to an embodiment of the present invention;
[0053] Figure 3 This is a graph showing the comparison between the predicted and actual demand for cold-rolled coils according to an embodiment of the present invention. Detailed Implementation
[0054] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the following description is provided in conjunction with the accompanying drawings. Figure 1-3 The present invention will be further described in detail below with reference to specific embodiments.
[0055] This embodiment takes the actual demand data of a steel plant's steel products as an example, and uses the steel product demand prediction method based on SARIMA-LSSVM of this invention to obtain the steel product demand prediction results.
[0056] (1) SARIMA model
[0057] A SARIMA model consists of six parts: AR, integration, MA, SAR, seasonal integration, and SMA. SARIMA is usually abbreviated as SARIMA(p,d,q)(P,D,Q). s Its predicted value can be expressed as a linear combination of the moving averages of the observations and corresponding residuals from previous periods over the non-seasonal and seasonal components, in the following form:
[0058]
[0059] Where c, φ l (l=1,2,...,p), θ k (k = 1, 2, ..., q), Φ l′ (l′=1,2,…,P) and Θ k′ (k′=1,2,…,Q) represent the parameters of the AR, MA, SAR, and SMA components, respectively; p and q represent the orders of the AR and MA components, respectively; P and Q represent the orders of the SAR and SMA components, respectively; d and D represent the orders of the conventional and seasonal differences, respectively; s represents the season length; Z t ε represents the observation value at time t; t Let represent the residual at time t, which follows a constant with zero mean and variance σ. 2 The normal distribution WN(0,σ) 2 Z t-l Z represents the observation value at time tl. t-l′-sε represents the observation value at time tl′-s. t-k ε represents the residual at time tk. t-k′-s represents the residual at time tk′-s, l represents the parameter index of the AR part, and l′ represents the parameter index of the SAR part.
[0060] (2) LSSVM model
[0061] The training dataset contains N samples (x). i ,y i ), i = 1, 2, ..., N, where It is the input of LSSVM, y i This is the corresponding output, where n is x. i If the dimension is , then the objective function of LSSVM is expressed as:
[0062]
[0063]
[0064] Where w T is a weight vector; γ is a regularization parameter used to balance model accuracy and complexity; b is the intercept; e i It is the error between the actual output and the estimated value of the i-th sample point. It is a way to make x i A nonlinear function that maps from the original feature space to a higher-dimensional space.
[0065] Due to Gaussian kernel K Gauss (x i ,x j ) and polynomial kernel K ploy (x i ,x j It has good nonlinear fitting ability and data noise resistance, therefore, a K-based approach is adopted. Gauss (x i ,x j ) and K ploy (x i ,x j The mixed kernel function K(x) is composed of ) i ,x j The LSSVM prediction model obtained is expressed as follows:
[0066]
[0067] K(x i ,x j )=a1K Gauss (x i ,x j )+a2K ploy(x i ,x j ), i,j=1,2,…,N
[0068] Where α1, α2, ..., α N b are the parameters of the LSSVM model; and a1>0 and a2=1-a1>0 are respectively K Gauss (x i ,x j ) and K ploy (x i ,x j The weights of the Gaussian kernel are σ. Here, the weights a1 and σ of the Gaussian kernel are... Gauss The power series d of the polynomial kernel ploy It is an adjustable parameter.
[0069] In this embodiment, a method for predicting steel product demand based on SARIMA-LSSVM is described, such as... Figure 1 As shown, it includes the following steps:
[0070] Step 1: Extract daily demand data for steel products in the spot market from the database and convert it into a time series Z-series data. t ;
[0071] Step 2: Use a SARIMA model with a sparse strategy based on the MOIDE algorithm to fit the linear components of the steel product demand data, thereby obtaining a series of predicted values. and the corresponding residual ε t The specific method is as follows:
[0072] Step 2.1: Use the unit root test to check whether the time series of steel product demand is stationary; if yes, proceed to step 2.2; if no, perform the difference operation until the time series satisfies stationarity, thus obtaining SARIMA(p,d,q)(P,D,Q). s The model uses the conventional difference order d and the seasonal difference order D.
[0073] In this embodiment, d = 1 and D = 1.
[0074] Step 2.2: Determine SARIMA(p,d,q)(P,D,Q) based on the fixed time intervals at which demand data repeatedly hit peaks and / or troughs in the time series graph of steel product demand. s The seasonal length s in the model;
[0075] In this embodiment, s = 10.
[0076] Step 2.3: Determine SARIMA(p,d,q)(P,D,Q) based on the autocorrelation function plot, partial autocorrelation function plot, and the accuracy and complexity of the fitted model of the stationary time series. s The maximum value of p for the order p of the AR part, the order q of the MA part, the order P of the SAR part, and the order Q of the SMA part. max q max P max and Q max ;
[0077] In this embodiment, p is set max =6, q max =2, P max =6 and Q max =4.
[0078] Step 2.4: Set all SARIMA(p,d,q)(P,D,Q) according to the accuracy and complexity of the fitted model. s The parameters c and φ in the model p (p = 1, 2, ..., p) max ), θ q (q=1,2,...,q max ), Φ P (P = 1, 2, ..., P) max ) and Θ Q (Q = 1, 2, ..., Q) max The range of values for the corresponding sparse thresholds c′, φ′, θ′, Φ′ and Θ′;
[0079] In this embodiment, parameters c and φ are set. p θ q Φ P and Θ Q The value range is [-1, 1], and the corresponding sparse thresholds are set to c′=0.02, φ′=0.2, θ′=0.1, Φ′=0.05 and Θ′=0.1 respectively.
[0080] Step 2.5: Combine the MOIDE algorithm and the sparsity strategy and apply them to the parameter estimation process of the SARIMA model. After one algorithm run, the optimal structure and optimal parameter value scheme of the SARIMA model are obtained simultaneously; for example... Figure 2 As shown, the specific method is as follows:
[0081] Step 2.5.1: Initialize the parameter selection scheme population and MOIDE algorithm parameters. Set the population size of the parameter selection scheme to NP, the total number of parameters to be estimated in the scheme to M, the initial number of iterations G = 0, and the maximum number of iterations G maxThe mutation probability F of individual genes under candidate parameter value schemes, the crossover probability CR of individuals under different parameter value schemes, and the external archive set.
[0082] The method for generating the population of initial parameter value schemes using a random strategy is as follows:
[0083] To improve prediction accuracy and reduce computational cost, a parameter value scheme is designed where each individual contains an AR component with an order p not exceeding p. max The order q of the MA part does not exceed q max The order P of the SAR part does not exceed P max The order Q of the SMA part does not exceed Q max All SARIMA(p,d,q)(P,D,Q) s The parameter set of the model; all SARIMA(p,d,q)(P,D,Q) s The parameters c and φ in the model p θ q Φ P and Θ Q Encode sequentially to obtain a parameter value scheme for the MOIDE algorithm population, where p = 1, 2, ..., p max q = 1, 2, ..., q max P = 1, 2, ..., P max Q = 1, 2, ..., Q max ; Let the value scheme of the g-th parameter in the population be as follows but This represents the encoded value of the h-th parameter in the model, where g = 1, 2, ..., NP, h = 1, 2, ..., M; and the value scheme for each parameter. coded value Based on uniform distribution Generate, and Represent The upper and lower bounds of the value.
[0084] In this embodiment, NP = 1000, M = 19, G max =1000, F=WN(0,0.6), CR=0.3,
[0085] Step 2.5.2: Calculate the value scheme for each parameter in the population based on the sparsity strategy. The objective function fitness value is used to obtain the individual with the best parameter value scheme in the population;
[0086] For each parameter value scheme The objective function is designed based on the accuracy and complexity of the SARIMA model, which are represented by the root mean square error and the number of non-zero parameters in the model respectively; by minimizing (1) and (2), each fitness value is calculated, and the specific expressions of objective functions (1) and (2) are:
[0087]
[0088]
[0089] wherein Z t and respectively represent the actual value and predicted value of the steel product demand data; is a 0-1 variable: indicates that is less than the set corresponding sparsity threshold; otherwise,
[0090] the specific method for determining model parameters and objective function based on sparsity strategy is:
[0091] In the process of parameter optimization, if the value of the constant term in the SARIMA model satisfies |c|<c′, that is: set and otherwise, set If the parameter of the AR part in the model satisfies |φ p |<φ′, that is: set and otherwise, set In other words, sample points with a parameter value of 0 do not participate in the calculation of objective functions (1) and (2); the same operation is performed to obtain the parameter θ of the MA part in the model q , that is: the parameter Φ of the SAR part P , that is: and the parameter Θ of the SMA part Q , that is: values and the values of corresponding parameters in each part; the values of objective functions (1) and (2) are obtained based on the above operations.
[0092] The advantage of combining the sparsity strategy with MOIDE to determine the parameters of the SARIMA model is that: in one operation, MOIDE can obtain that the order p of the AR part does not exceed p max , the order q of the MA part does not exceed q max , the order P of the SAR part does not exceed P max , the order Q of the SMA part does not exceed Q maxAll SARIMA(p,d,q)(P,D,Q) s The model's parameter set. In other words, after one run, MOIDE can simultaneously obtain the optimal structure of the SARIMA model and the optimal parameters of the corresponding model structure. In comparison, the traditional Box-Jenkins parameter estimation method can only obtain a unique SARIMA(p,d,q)(P,D,Q) with fixed p, q, P, and Q after each run. s The model. Therefore, the order p of the AR part is no more than p. max The order q of the MA part does not exceed q max The order P of the SAR part does not exceed P max The order Q of the SMA part does not exceed Q max All SARIMA(p,d,q)(P,D,Q) s The model needs to run p max ×q max ×P max ×Q max This algorithm effectively removes redundant and outlier data from the training samples, reducing computational costs and improving model accuracy. This also contributes to the design of c and φ. p (p = 1, 2, ..., p) max ), θ q (q=1,2,...,q max ), Φ P (P = 1, 2, ..., P) max ) and Θ Q (Q = 1, 2, ..., Q) max (instead of c, φ) l (l=1,2,...,p), θ k (k = 1, 2, ..., q), Φ l′ (l′=1,2,…,P) and Θ k′ The reason why (k′=1,2,…,Q) is used as an individual parameter value scheme.
[0093] Step 2.5.3: Execute G = G + 1. If G > G max If so, proceed to step 2.5.8; otherwise, proceed to step 2.5.4.
[0094] Step 2.5.4: For the value scheme of the g-th parameter Randomly select three distinct parameter value schemes (not equal to g) from the population, and combine these schemes to obtain the target scheme. Mutation scheme Obtain the solution The method is as follows:
[0095]
[0096] Where F is normally distributed WN(μ,σ) 2 (Randomly generated; r1, r2, and r3 are integers different from g, randomly selected from the set {1,2,...,NP};) This is the individual with the best parameter settings in the Gth generation population. To ensure the prediction accuracy of the SARIMA model and prevent overfitting, the individual with the smallest prediction accuracy growth rate in the external archive set is selected as... The minimum prediction accuracy growth rate refers to the growth rate that occurs when a model adds a parameter, resulting in a corresponding increase in prediction accuracy. The minimum growth rate is the one with the smallest value among all growth rates.
[0097] After performing the above operations, the individual mutation scheme Encoded values of some elements This may be outside its defined domain. The following are ways to fix these invalid encoded values:
[0098]
[0099] rand h (x1,x2) represents a real number randomly selected from the interval [x1,x2].
[0100] Step 2.5.5: Combine scheme individuals with the same number and Perform cross operations on some elements to obtain individual solutions. Corresponding cross scheme individuals Among them, acquiring individuals The formula is as follows:
[0101]
[0102] Where CR is a real number randomly selected from the interval [0,1], h rand It is an index randomly selected from the set {1,2,...,M}.
[0103] Step 2.5.6: Calculate and compare parameter value schemes and The fitness value of the objective function is determined based on the merits of the proposed solutions. still Individuals that can become part of the set of candidate parameter value schemes for the next generation; the specific methods for determining which individuals will become part of the next generation population are as follows:
[0104]
[0105] Step 2.5.7: Update the external archive set Arch_set based on the dominance relationship between the candidate solution set and the individual solutions with parameter values in the external archive set;
[0106] In this embodiment, for each individual parameter value scheme Update Arch_set by executing scenarios 1-3:
[0107] Scenario 1: If To control an individual in an Arch_set, add... Add to Arch_set, and simultaneously delete all instances of Arch_set that were previously added. The dominant individual;
[0108] Scenario 2: If If there is no dominion relationship with any individual in the Arch_set, then... Add to Arch_set;
[0109] Scenario 3: If If it is dominated by any individual in the Arch_set, then refuse to... Add it to the Arch_set.
[0110] Step 2.5.8: If the current iteration number G > G max If the algorithm fails, it stops running, outputs the optimal parameter values of the SARIMA model, and determines the optimal structure of the model accordingly; otherwise, it proceeds to step 2.5.3.
[0111] Step 2.6: Use the optimal SARIMA model obtained in Step 2.5 to perform rolling forecasts on the steel product demand data, and obtain the rolling forecast values for the demand time series. and the corresponding residual ε t ;
[0112] Step 2.7: Verify the validity of the SARIMA model: if yes, proceed to step 3; if no, proceed to step 2.2.
[0113] Step 3: Fit the residual data ε using an LSSVM model based on the DE algorithm. t The nonlinear components in the data are used to obtain a series of predicted values. The specific method is as follows:
[0114] Step 3.1: Transfer the residual data ε t Normalization is performed to obtain the training sample set;
[0115] residual data ε t The specific method of normalization is as follows:
[0116] set up and For the sequence {ε t The maximum and minimum values of} are obtained based on the following method: t The normalized sequence of ′:
[0117]
[0118] Step 3.2: Set the regularization parameter γ, the weight a1 of the Gaussian kernel function, and the width σ of the Gaussian kernel based on the actual operating conditions. Gauss and polynomial kernel power series d ploy The range of values for;
[0119] In this embodiment, γ, a1, and σ are set. Gauss and d ploy The value ranges are [100,200], [0,1], [1,10] and [1,5].
[0120] Step 3.3: Obtain the optimal parameter values for the LSSVM model based on the DE algorithm;
[0121] Step 3.3.1: Initialize the parameter selection scheme population and algorithm parameters. Set the population size of the parameter selection scheme to NP1, the total number of parameters to be estimated to M1, the initial number of iterations to G1 = 0, and the maximum number of iterations to G1. The mutation probability F1 of individual genes under candidate parameter value schemes, and the crossover probability CR1 of individuals under different model parameter value schemes;
[0122] In this embodiment, NP1 = 100 and M1 = 4 are set. F1 = 0.5, CR1 = 0.5.
[0123] Step 3.3.2: Based on the domain of each parameter in the model, generate a population of initial parameter value schemes using a random strategy;
[0124] The method for generating the population of initial parameter value schemes using a random strategy is as follows:
[0125] The parameters γ, a1, and σ in the LSSVM model are... Gauss and d ploy Encode sequentially to obtain a parameter value scheme in the DE algorithm population. but express The encoded value of the h1-th parameter, g1 = 1, 2, ..., NP1, h1 = 1, 2, ..., M1; where, Based on uniform distribution Generate, and Represent The upper and lower bounds of the value.
[0126] Step 3.3.3: Execute G1 = G1 + 1, if If so, proceed to step 3.3.7; otherwise, proceed to step 3.3.4.
[0127] Step 3.3.4: For the individual parameter value scheme of the g1th parameter The mutation strategy "DE / rand / 1" is used to generate mutated individuals corresponding to the given individual.
[0128] For each mutation scheme individual There may be cases where the encoded values of some elements in an individual exceed the predetermined boundary values. Here, formula (4) is used to repair invalid codes.
[0129] Step 3.3.5: Combine scheme individuals with the same number and Perform cross operations on some elements to obtain individual solutions. Corresponding cross scheme individuals Among them, acquiring individuals The operation is shown in formula (5);
[0130] Step 3.3.6: Calculate and compare parameter value schemes. and The fitness value of the objective function is determined based on the merits of the proposed solutions. still It can become an individual in the set of candidate parameter value schemes for the next generation; the specific operations for determining whether it can become an individual in the set of candidate parameter value schemes for the next generation are as follows;
[0131]
[0132] Step 3.3.7: If the current iteration number is... If the algorithm stops running, the optimal parameter values for the LSSVM model are output; otherwise, proceed to step 3.3.3.
[0133] Step 3.3.8: Based on the optimal parameter values, use Gaussian elimination to obtain the parameters α and b of the LSSVM model.
[0134] Step 3.4: Use the optimal LSSVM model obtained in Step 3.3 to perform rolling prediction and denormalization on the normalized residual data to obtain the rolling predicted values of the residual data.
[0135] Step 3.5: Verify the validity of the hybrid model SARIMA-LSSVM: If yes, proceed to step 4; if no, proceed to step 3.2.
[0136] Step 4: and Add them together to get the final forecast of steel product demand.
[0137] In this implementation, based on actual data of the spot market demand for cold-rolled coils from a domestic steel mill, the comparison results between the predicted and actual values of steel product demand obtained using the method of this invention are as follows: Figure 3 As shown. By Figure 3 It can be seen that the predicted demand for cold-rolled coils can closely approximate the actual value, and the prediction error rate does not exceed 9%. This indicates that the prediction accuracy of SARIMA-LSSVM can meet the requirements of actual production.
[0138] To further evaluate the predictive performance of the SARIMA-LSSVM model, the mean absolute percentage error, root mean square error, and maximum absolute error of different models were obtained based on the MOIDE algorithm, as shown in Table 1.
[0139] Table 1 Performance Comparison of Different Models
[0140] SARIMA 4.6505 40.8660 103.7022 LSSVM 21.1140 174.6599 372.9485 SARIMA-LSSVM 4.3677 35.3285 77.5336
[0141] As can be seen from Table 1, compared with the single models SARIMA and LSSVM, the SARIMA-LSSVM model significantly reduces the prediction error and improves the prediction accuracy of the demand for cold-rolled coils.
[0142] To evaluate the performance of the MOIDE algorithm, the mean absolute percentage error, root mean square error, and maximum absolute error of the SARIMA-LSSVM model were obtained based on the Nondominated Sorting Genetic Algorithm II (NSGAII) and the Multi-objective Evolutionary Algorithm based on Decomposition (MOEA / D), as shown in Table 2.
[0143] Table 2 Performance comparison of SARIMA-LSSVM models based on different algorithms
[0144] MOIDE 4.3677 35.3285 77.5336 NSGAII 6.7662 57.4379 130.8232 MOEA / D 5.8670 51.0198 122.2095
[0145] As can be seen from Table 2, compared with NSGAII and MOEA / D, MOIDE enables SARIMA-LSSVM to achieve a smaller prediction error, which indicates that MOIDE has better global convergence than the other two algorithms, thus verifying the performance of MOIDE.
[0146] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for predicting steel product demand based on SARIMA-LSSVM, characterized in that, Includes the following steps: Step 1: Extract daily demand data for steel products in the spot market from the database and convert it into a time series Z-series. t ; Step 2: Fit the linear components of the steel product demand data using a SARIMA model with a sparse strategy based on an improved multi-objective differential evolution algorithm, thereby obtaining a series of predicted values. and the corresponding residual ε t ; Step 2.1: Use the unit root test to check whether the time series of steel product demand is stationary; if yes, proceed to step 2.2; if no, perform the difference operation until the time series satisfies stationarity, thus obtaining SARIMA(p,d,q)(P,D,Q). s The model uses the conventional difference order d and the seasonal difference order D. Step 2.2: Determine SARIMA(p,d,q)(P,D,Q) based on the fixed time intervals at which demand data repeatedly hit peaks and / or troughs in the time series graph of steel product demand. s The seasonal length s in the model; Step 2.3: Determine SARIMA(p,d,q)(P,D,Q) based on the autocorrelation function plot, partial autocorrelation function plot, and the accuracy and complexity of the fitted model of the stationary time series. s The maximum value of the order p of the autoregressive component, the order q of the moving average component, the order P of the seasonal autoregressive component, and the order Q of the seasonal moving average component. max q max P max and Q max ; Step 2.4: Set all SARIMA(p,d,q)(P,D,Q) according to the accuracy and complexity of the fitted model. s The parameters c and φ in the model p (p = 1, 2, ..., p) max ), θ q (q=1,2,...,q max ), Φ P (P = 1, 2, ..., P) max ) and Θ Q (Q = 1, 2, ..., Q) max The range of values for the corresponding sparse thresholds c′, φ′, θ′, Φ′ and Θ′; Step 2.5: Combine the MOIDE algorithm and the sparsity strategy and apply them to the parameter estimation process of the SARIMA model. After one algorithm run, the optimal structure and optimal parameter value scheme of the SARIMA model are obtained simultaneously. Step 2.6: Use the optimal SARIMA model obtained in Step 2.5 to perform rolling forecasts on the steel product demand data, and obtain the rolling forecast values for the demand time series. and the corresponding residual ε t ; Step 2.7: Verify the validity of the SARIMA model: if yes, proceed to step 3; if no, proceed to step 2.
2. Step 3: Fit the residual data ε using a least-squares support vector machine model based on the differential evolution algorithm. t The nonlinear components in the data are used to obtain a series of predicted values. Step 3.1: Transfer the residual data ε t Normalization is performed to obtain the training sample set; Step 3.2: Set the regularization parameter γ, the weight a1 of the Gaussian kernel function, and the width σ of the Gaussian kernel based on the actual operating conditions. Gauss and polynomial kernel power series d ploy The range of values for; Step 3.3: Obtain the optimal parameter values for the LSSVM model based on the DE algorithm; Step 3.4: Use the optimal LSSVM model obtained in Step 3.3 to perform rolling prediction and denormalization on the normalized residual data to obtain the rolling predicted values of the residual data. Step 3.5: Verify the validity of the hybrid model SARIMA-LSSVM: If yes, proceed to step 4; if no, proceed to step 3.
2. Step 4: and Add them together to get the final forecast of steel product demand.
2. The method for predicting steel product demand based on SARIMA-LSSVM according to claim 1, characterized in that: The specific method for step 2.5 is as follows: Step 2.5.1: Initialize the parameter selection scheme population and MOIDE algorithm parameters. Set the population size of the parameter selection scheme to NP, the total number of parameters to be estimated in the scheme to M, the initial number of iterations G = 0, and the maximum number of iterations G max The mutation probability F of individual genes under candidate parameter value schemes, the crossover probability CR of individuals under different parameter value schemes, and the external archive set. The method for generating the population of initial parameter value schemes using a random strategy is as follows: To improve prediction accuracy and reduce computational cost, a parameter value scheme is designed where each individual contains an AR component with an order p not exceeding p. max The order q of the MA part does not exceed q max The order P of the SAR part does not exceed P max The order Q of the SMA part does not exceed Q max All SARIMA(p,d,q)(P,D,Q) s The parameter set of the model; all SARIMA(p,d,q)(P,D,Q) s The parameters c and φ in the model p θ q Φ P and Θ Q Encode sequentially to obtain a parameter value scheme for the MOIDE algorithm population, where p = 1, 2, ..., p max q = 1, 2, ..., q max P = 1, 2, ..., P max Q = 1, 2, ..., Q max ; Let the value scheme of the g-th parameter in the population be as follows but This represents the encoded value of the h-th parameter in the model, where g = 1, 2, ..., NP, h = 1, 2, ..., M; and the value scheme for each parameter. coded value Based on uniform distribution Generate, and Represent Upper and lower bounds of the value; Step 2.5.2: Calculate the value scheme for each parameter in the population based on the sparsity strategy. The objective function fitness value is used to obtain the individual with the best parameter value scheme in the population; Step 2.5.3: Execute G = G + 1. If G > G max If so, proceed to step 2.5.8; otherwise, proceed to step 2.5.
4. Step 2.5.4: For the value scheme of the g-th parameter Randomly select three distinct parameter value schemes (not equal to g) from the population, and combine these schemes to obtain the target scheme. Mutation scheme Step 2.5.5: Combine scheme individuals with the same number and Perform cross operations on some elements to obtain individual solutions. Corresponding cross scheme individuals Step 2.5.6: Calculate and compare parameter value schemes. and The fitness value of the objective function is determined based on the merits of the proposed solutions. still It can become an individual in the next generation of candidate parameter value schemes; Step 2.5.7: Update the external archive set Arch_set based on the dominance relationship between the candidate solution set and the individual solutions with parameter values in the external archive set; Step 2.5.8: If the current iteration number G > G max If the algorithm fails, it stops running, outputs the optimal parameter values of the SARIMA model, and determines the optimal structure of the model; otherwise, it proceeds to step 2.5.
3.
3. The method for predicting steel product demand based on SARIMA-LSSVM according to claim 2, characterized in that: The specific method for step 2.5.2 is as follows: For each parameter value scheme The objective function is designed to be the accuracy and complexity of the SARIMA model, represented by the root mean square error and the number of non-zero parameters in the model, respectively; by minimizing (1) and (2), each... The fitness value, and the specific expressions of the objective functions (1) and (2) are: Z t and These represent the actual and predicted values of steel product demand data, respectively. It is a 0-1 variable: express If it is less than the set corresponding sparsity threshold; otherwise, The specific method for determining model parameters and objective function based on sparse strategies is as follows: In the parameter optimization process, if the value of the constant term in the SARIMA model satisfies |c|<c′, that is: set and otherwise, set if the parameter of the AR part in the model satisfies |φ p |<φ′, that is: set and otherwise, set In other words, sample points with parameter 0 do not participate in the calculation of objective functions (1) and (2); the parameter θ of the MA part in the model is obtained by performing the same operation q , that is: the parameter Φ of the SAR part P , that is: and the parameter Θ of the SMA part Q , that is: the values of and the corresponding values of each part of the parameters ; the values of objective functions (1) and (2) are obtained based on the above operations.
4. The method for predicting steel product demand based on SARIMA-LSSVM according to claim 1, characterized in that: The specific method for step 3.3 is as follows: Step 3.3.1: Initialize the parameter selection scheme population and algorithm parameters. Set the population size of the parameter selection scheme to NP1, the total number of parameters to be estimated to M1, the initial number of iterations G1 = 0, and the maximum number of iterations. The mutation probability F1 of individual genes under candidate parameter value schemes, and the crossover probability CR1 of individuals under different model parameter value schemes; Step 3.3.2: Based on the domain of each parameter in the model, generate a population of initial parameter value schemes using a random strategy; Step 3.3.3: Execute G1 = G1 + 1, if If so, proceed to step 3.3.7; otherwise, proceed to step 3.3.
4. Step 3.3.4: For the individual parameter value scheme of the g1th parameter The mutation strategy "DE / rand / 1" is used to generate mutated individuals corresponding to the given individual. Step 3.3.5: Combine scheme individuals with the same number and Perform cross operations on some elements to obtain individual solutions. Corresponding cross scheme individuals Step 3.3.6: Calculate and compare parameter value schemes. and The fitness value of the objective function is determined based on the merits of the proposed solutions. still It can become an individual in the next generation of candidate parameter value schemes; Step 3.3.7: If the current iteration number is... If the algorithm stops running, the optimal parameter values for the LSSVM model are output; otherwise, proceed to step 3.3.
3. Step 3.3.8: Based on the optimal parameter values, use Gaussian elimination to obtain the parameters α and b of the LSSVM model.