## 3 Model Construction  
### Optimized Prediction Model Construction  
Optimization of the SVR and ELM Models Based on the SSA  
Intelligent optimization algorithms are effective for parametric optimization and search tasks. The SSA, in particular, excels due to its simple design, few control parameters, high precision, and fast convergence, especially in complex optimizations [24; 25]. It has been widely applied in fields like machine learning parameter optimization, engineering, and fault diagnosis [36; 37]. Therefore, the SSA was chosen for optimizing the parameters of the SVR and ELM models. The optimization processes are illustrated in Figures 1 and 2. (1) Training and test set determination. The pork price data collected from Beijing serve as the initial sample dataset. These data are then normalized, and subsequently, the dataset is divided into a training subset and a testing subset at a ratio of 7:3. (2) Parameter initialization. Suppose the population comprises \(n\) sparrows. Consequently, the population of all individuals can be represented as \(X=\left[x_{1},x_{2},x_{3},\dots,x_{n}\right]^{T}\), and for each individual, there is a corresponding fitness function denoted by \(F=\left[f(x_{1}),f(x_{2}),f(x_{3}),\dots,f(x_{n})\right]^{T}\). In addition, various parameters are defined, including the fitness function \(F\), and the population of all individuals can be represented as \(X=\left[x_{1},x_{2},x_{3},\dots,x_{n}\right]^{T}\). The population of all individuals can be represented as \(X=\left[x_{1},x_{2},x_{3},\dots,x_{n}\right]^{T}\), and for each individual, there is a corresponding fitness function denoted by \(F=\left[f(x_{1}),f(x_{2}),f(x_{3}),\dots,f(x_{n})\right]^{T}\). In addition, various parameters are defined, including the fitness function \(F\), and the population of all individuals can be represented as \(X=\left[x_{1},x_{2},x_{3},\dots,x_{n}\right]^{T}\). Figure 1: The flow chart of SVR optimization by the SSA. ing the overall population size, the upper limit of iterations, the proportion of discoverers, the ratio of scouts, and the warning threshold. (3) Fitness value determination. The training samples are used for forecasting, and the mean squared error between the predicted and actual values of the training set is calculated as the fitness measure for each sparrow. The best fitness value and position information are then stored. (4) Discoverer location updating. Based on the value of the alert threshold, the position of the discoverer is updated using Equation (1). Figure 2: The flow chart of ELM optimization by the SSA. The method for updating the position of the discoverer is provided by the following equation:  
\[x_{i,j}^{t+1}= \begin{cases}x_{i,j}^{t}\cdot exp(\frac{-i}{a\times it \mathit{max}}),R_{2}<ST\\ x_{i,j}^{t}+Q\cdot L,R_{2}\geq ST\end{cases} , \tag{1}\]  
where \(t\) denotes the current iteration count, \(x_{i,j}^{t}\) represents the position of the \(ith\) sparrow in the \(jth\) dimension during the \(tth\) generation, \(j=1,2,\ldots,d\); \(iter_{max}\) indicates the maximum number of iterations, and \(\alpha\) is a random number, where \(\alpha\in(0,1]\). Additionally, \(R_{2}\) refers to the alarm value, \(R_{2}\in(0,1]\), \(ST\) is the safety threshold, \(ST\in(0.5,1]\), \(Q\) is a random number drawn from a standard normal distribution, and \(L\) is an \(1\times d\) matrix where each element is \(1\). (5) Follower position updating. The location of the follower is adjusted according to Equation (2). The algorithm for adjusting the position of the followers is as follows:  
\[x_{i,j}^{t+1}= \begin{cases}Q\cdot exp(\frac{x_{\mathit{worst}^{t}}^{t}-x_{i,j }^{t}}{2}),&i>\frac{n}{2}\\ x_{p}^{t+1}+\left|x_{i,j}^{t}-x_{p}^{t+1}\right|\cdot A^{+}\cdot L,&i\leq\frac {n}{2}\end{cases}