## 3 Methodology  
With the rapid development of machine learning technology, its application has become increasingly widespread. In regression prediction problems, decision trees (CART) are widely used due to their simplicity and efficiency in solving complex real-life problems. However, the performance of the CART model depends on the selection of model hyperparameters. Manual pruning techniques are subjective, requiring an amount of time and expensive costs. Moreover, manual operations also lack certainty, unable to guarantee the discovery of globally optimal hyperparameters for decision trees. The traditional optimization algorithm of a decision tree mainly includes pre-pruning and post-pruning. The \begin{table}
\begin{tabular}{p{85.4 pt} p{113.8 pt} p{113.8 pt}} \hline \hline
**Author** & **Model** & **Conclusion** \\ \hline [PERSON] et al. [25] & CNN-GA & To predict 1603 daily sample data values using the short-term forecast model of GA-CNN; the relative error between predicted data and real data is less than 0.5\%. \\ [PERSON] et al. [29] & SVM & The experiments showed that similar subsequence search and support vector regression models solved the pseudo periodic problem, and achieved higher accuracy. \\ [PERSON] et al. [35] & LSTM & They utilized the topic modeling technique (LDA) to select the top 20 features from 862 features using Pearson correlation to decrease the feature dimensionality in pork prices. \\ [PERSON] et al. [37] & STL-SVR-Alma & The results indicate an overall improvement in forecasting of pork prices through the utilization of the STL-SVR-Alma model incorporating the factors of cyclical price fluctuations, seasonal variations, and irregular fluctuations. \\ [PERSON] et al. [38] & CEEMD and GA-SVR & The results highlight that combining the GA algorithm with a hybrid SVM model leads to higher prediction accuracy and durability compared to a single SVR model. \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Collection of relevant literature on pork price prediction. pre-pruning method cannot grasp the global information of the tree and has certain blindness, and this method involves difficulty to determine whether the child nodes of clipped nodes have existence value, which may cause the decision tree to stop growing prematurely, and thus it cannot obtain the optimal decision tree. In addition, the post-pruning algorithm is usually based on statistical knowledge, and some of its parameters either depend on prior statistical laws, the domain knowledge of experts, or certain assumptions, and often need to go through repeated comparative tests to obtain satisfactory results [44]. Compared to other machine learning models, using decision trees for regression prediction of pork prices not only allows for an intuitive visualization of the price prediction process but also does not necessitate the use of complex computing power. The model can be efficiently computed on standard hardware at lower computational costs. Considering the drawbacks of traditional manual hyperparameter tuning, we adopted intelligent optimization algorithms to optimize the decision tree regression algorithm. Currently, the Sparrow Search Algorithm (SSA) is known for its rapid convergence and reliable stability in finding the optimal parameters through a discoverer, follower, and alert. It has emerged as a research hotspot in the field of algorithm optimization. The SSA algorithm is based on the behavior of a sparrow population to solve the optimization problem of the objective function. The principle of the decision tree is to generate trees in different positional spaces, while the SSA algorithm precisely searches for optimal positions until the optimal solution to the optimization problem is found. Based on this, we propose a Sparrow Search Algorithm to optimize the CART model for predicting pork prices. We use the MinLeafSize of the decision tree as the input for the Sparrow Search Algorithm, and use the mean squared error as the maximum fitness value to determine the optimal value of the MinLeafSize.