# Intelligent Method of Supply Chain Circulation Industry Structure Based on Machine Learning

Authors: JingFei Ran
Journal: Mobile Information Systems
 (2021)

---

## Abstract

In the deepening of supply chain competition, whether the structure of supply chain industry is reasonable and scientific has been severely tested. For warehousing, purchase and distribution channels, and customers, it largely determines whether the structure of supply chain is stable and efficient. The rationality of structure can determine the value of supply chain. By analyzing these four levels, this paper judges whether the supply chain structure is reasonable; the judgment standard is based on the three popular machine learning models, Stochastic Forest, XGBoost, and Support Vector Machine. The three models are based on a large number of real data environments. Through data simulation and parameter optimization, four supply chain characteristics are put into the model for simulation training for many times, and the three error numbers of MAE, RMSE, and MAPE of the model are analyzed to judge the reliability of the model. On this basis, through the combination of models, it is determined that the average percentage error of the combination of the three models is higher than that of the other pairwise combinations, reaching 0.937, which completes the expectation of intelligent prediction of supply chain structure.


---

## Body

## 1. Introduction

Thanks to the development of market economy, the supply chain system has gradually become more mature, but it brings new problems. The intelligent structure of supply chain is often more severe when facing the development impact of the new era, and the intelligent structure of supply chain network has become an important challenge for enterprises to develop at a higher speed. In the intelligent of supply chain structure, more and more people are beginning to pay attention to its commercial and environmental factors. People are also looking for suitable models in order to solve the uncertainty and reduce the uncertain parameters caused by risks. Most scholars put forward models based on mathematical programming for intelligent supply chain structure; for example, a biobjective possibility mixed integer programming model is proposed to solve the cost problem [1]. Corresponding to the whole supply chain structure, there are some limitations in the planning of mathematical models; according to the complexity of the problem, the traditional precise method [2], optimization software, or heuristic algorithm can be used. The two-stage stochastic programming model is proposed [3]; it also has reference value when dealing with the supplier production capacity problem based on the actual situation. The model makes a sufficient trade-off between cost and risk. For the same model can also solve different practical problems, such as the same two-stage stochastic programming model, researchers also considered using value-at-risk (CVaR) as a risk evaluator to optimize the risk caused by location-allocation by changing the expected value of parameters [4]. In the CLSC network in the secondary supply market mentioned in some studies [5], fuzzy algorithm can be used to stimulate the customer's demand positively to improve the activity of the supply chain network. To improve the reliability of the system, a heuristic algorithm-comparative particle swarm optimization algorithm is proposed [6]. In the face of environmental uncertainty and instability of supply chain network, the stability of the whole system can be greatly enhanced by optimizing the robustness. A fuzzy value-at-risk (VAR) optimization model is proposed [7], to simulate and optimize the uncertain demand and cost of supply chain. In recent years, machine learning has become increasingly popular. Because of its strong predictability and trainability, it has brought about the evolution and progress of traditional mathematical models. As mentioned in recent research [8], the field of machine learning has been gradually established, and it has great relevance to other fields. Some studies also prove that machine learning has made great progress in various aspects [9]. Hinton [10] puts forward that better assignment of initial weights can better solve the gradient descent problem caused by machine learning model. Cavalcante I M [11] discusses the correlation of supply chain performance using simulation and machine learning. The problem of building energy consumption can also be solved by machine learning and data, just like the results completed by Bourdeau M et al. [12]. In machine learning, there are three suitable models for simulating supply chain structure, among which XGBoost model has attracted great attention since it was launched. Because of its excellent performance, it is also the best recommended model in mathematics competition. Stochastic forest model transforms predicted things into tree structure, which is connected by vectors one by one to minimize the error rate [13].In addition, there is a support vector machine model (SVM), which projects data in high-dimensional space through nonlinear mapping and then constructs an optimal regression plane in feature space to complete classification or regression tasks [14].As a famous machine learning algorithm, SVM can get much better results than other algorithms on small sample training sets. Support vector machine has excellent generalization ability, but for relatively large training set, SVM training time will be relatively long. Random forests can process very high dimensional data (that is, data with many features) without feature selection. In addition, after the training, random forest can give which features are more important and have good performance, which has great advantages compared with other algorithms. XGBoost takes a page from the random forest playbook and supports column sampling, which not only reduces overfitting, but also reduces computation. XGBoost has fast training speed and can support parallel computing with high computational efficiency. To sum up, for the intelligence of supply chain structure, the performance of three machine learning models is tested [15], and then these three machine semester models are combined, and the combined results are analyzed to find the most suitable model combination for the intelligent of supply chain structure and explain the feasibility and effectiveness of the models.This paper mainly has the following highlights and contributions: (1) three classic ML algorithms (XGBoost, SVM, and RF) are applied in the field of supply chain structure prediction, and the method is evaluated by different values such as MAPE. (2) Gray wolf optimization algorithm is applied for paraments optimization to improve the accuracy of the proposed model. (3) We proposed a hybrid assemble model through mixing the three models in different ways, and the experiment result indicates that it outperforms other classical benchmark methods.


## 2. Basic Theory of Supply Chain Structure

### 2.1. Supply Chain Structure

Supply chain refers to the turnover of products or services from the factory to the enterprise, and through a certain route to deliver them to consumers. Supply chain is a chain channel that connects suppliers, warehouses, distributors, and retailers in series. The structural intelligence of supply chain is mainly to solve the problems between structures. If enterprises connected with supply are represented by nodes, and links between enterprises are represented by line segments, then supply chain can be regarded as a network chain structure composed of multiple points and lines [16], as shown in Figure 1.Figure 1
Supply chain structure diagram.


### 2.2. Machine Learning Algorithm in Supply Chain Forecasting

The powerful predictive ability of machine learning model in regression and classification has been applied in various fields [17]. Machine learning algorithm can analyze and predict big data and improve supply chain efficiency. Resource, time, or cost constraints are the most important problems faced by supply chain managers, and the most ideal solution to these problems is to optimize analysis and design with the help of machine learning. This is the theoretical basis for machine learning to solve the problem of supply chain optimization. At present, Amazon Kiva, which is relatively mature, relies on artificial intelligence and machine learning technology to forecast the network demand for DHL, a world-famous logistics group [18]. The analysis system sets 58 different parameters based on machine learning algorithm to analyze and interpret the main factors leading to delivery delay. The use of machine learning improves the fitting accuracy and response speed of prediction network and enables enterprise managers to devote more energy to improving customer service quality. It can be said that artificial intelligence is changing this era, and the extensive use of machine learning will redefine the management mode of supply chain. According to the report of Gartner, the world's top information technology research company, it is predicted that the future supply chain will rely on supervised or unsupervised machine learning analysis results to assist the formulation of unexpected problem solutions. Gartner also predicts that artificial intelligence technology will be deployed in all key nodes of the supply chain in an embedded or nonembedded way, which will improve the information transmission efficiency of supply chain nodes and realize the information sharing of the whole supply chain.


#### 2.2.1. XGBoost

In 2016, Chen and Guestrin first proposed XGBoost model [19]. Since the model came out, it has been noted by data enthusiasts from all over the world. Because the XGBoost model has a direct or continuous system, the best performance solution of the XGBoost model in the running process is to complement the XGBoost model, so XGBoost is the best recommended model in the competition. XGBoost's high performance and low data features can be applied in many ways. XGBoost integrates multiple decision models by using the idea of integration and obtains greater integration ability than the original model. XGBoost has the following three points:First, it supports parallel computing, and the algorithm is fast; second, based on the extraction algorithm, sparse data can be automatically sorted; third, the data can be in batches, and the calculation speed is high. In the XGBoost model, decision trees interact with each other through the principle of addition, as shown in the following formula:(1)y¯=∑k=1KfkXi,fk∈F.The objective function in the algorithm is shown in the following formula:(2)Lφ=∑ily¯,yi+∑kΩfk.For each regression tree, it can be expressed as(3)fk=wqx,w∈RT,q:Rd.The complexity for each tree can be written as(4)Ωfk=γT+12λ∑J=1Twj2.


#### 2.2.2. Random Forests

Stochastic forest, proposed by Brayman in 2001, is a machine learning method that uses ensemble learning idea to establish multiple decision tree sets that do not affect each other to solve regression or classification [20]. The weak learner clusters are combined to build a decision tree group. In the sampling mode, we choose the random way to extract the data from the target data set and use the extracted samples to build the basic learner. Generally, we choose CART decision tree as the use scheme of weak learner. The random processing mode of random forest is the random grasping analysis of data. For 1/3 of the data that does not participate in random calculation, it is called out of bag (OOB). Based on these advantages, the whole simulation process in random forest is very close to reality and has high computational efficiency. Spam data can be properly filtered. The modeling steps of stochastic forest model are as follows:Step1:m sample points are randomly selected from the training sample set S to obtain a new S1…Sn subtraining set.Step2: Train a CART regression tree (decision tree) with subtraining set. In the process of training, the segmentation rule for each node is to randomly selectK features from all features and then select the optimal segmentation point from these K features to divide left and right subtrees (the resulting decision trees are binary trees).Step3: Through the second step, many CART regression tree models can be generated.Step4: The final prediction result of each CART regression tree is the mean value of the leaf nodes reached by this sample point.Step5: The final prediction result of the random forest is the mean of the predicted results of all CART regression trees.


#### 2.2.3. Support Vector Machines (SVM)

Support Vector Machines are a supervised learning model, which is used for data analysis and pattern recognition and is widely used in classification and regression fields [21]. The mathematical expression of the model construction is as formula (10), where w represents the weight, and c represents the penalty coefficient, where ξ is a relaxation variable. The basic rule of support vector machine is to construct data resources in space vector to form high-dimensional map. Then, the classification or regression task is completed by regression plane. Regression model optimization equation is(5)min12w2+c∑i=1mξi+ξi∗.The general regression expression is shown in the following formula:(6)fx=w,ϕx+b.There are four basic kernel functions in support vector machine [22], which are linear kernel function, Gaussian kernel function, polynomial kernel function, and radial basis function kernel function. The Gaussian kernel function is(7)Kxi,xj=e−1/2σ2xi−xj2.The expression of polynomial kernel function is(8)Kxi,xj=xi,xj+rd.The expression of radial basis kernel function is(9)Kxi,xj=e−γxi−xj2.The expression of linear kernel function is(10)Kx,z=x•z.


## 2.1. Supply Chain Structure

Supply chain refers to the turnover of products or services from the factory to the enterprise, and through a certain route to deliver them to consumers. Supply chain is a chain channel that connects suppliers, warehouses, distributors, and retailers in series. The structural intelligence of supply chain is mainly to solve the problems between structures. If enterprises connected with supply are represented by nodes, and links between enterprises are represented by line segments, then supply chain can be regarded as a network chain structure composed of multiple points and lines [16], as shown in Figure 1.Figure 1
Supply chain structure diagram.


## 2.2. Machine Learning Algorithm in Supply Chain Forecasting

The powerful predictive ability of machine learning model in regression and classification has been applied in various fields [17]. Machine learning algorithm can analyze and predict big data and improve supply chain efficiency. Resource, time, or cost constraints are the most important problems faced by supply chain managers, and the most ideal solution to these problems is to optimize analysis and design with the help of machine learning. This is the theoretical basis for machine learning to solve the problem of supply chain optimization. At present, Amazon Kiva, which is relatively mature, relies on artificial intelligence and machine learning technology to forecast the network demand for DHL, a world-famous logistics group [18]. The analysis system sets 58 different parameters based on machine learning algorithm to analyze and interpret the main factors leading to delivery delay. The use of machine learning improves the fitting accuracy and response speed of prediction network and enables enterprise managers to devote more energy to improving customer service quality. It can be said that artificial intelligence is changing this era, and the extensive use of machine learning will redefine the management mode of supply chain. According to the report of Gartner, the world's top information technology research company, it is predicted that the future supply chain will rely on supervised or unsupervised machine learning analysis results to assist the formulation of unexpected problem solutions. Gartner also predicts that artificial intelligence technology will be deployed in all key nodes of the supply chain in an embedded or nonembedded way, which will improve the information transmission efficiency of supply chain nodes and realize the information sharing of the whole supply chain.


### 2.2.1. XGBoost

In 2016, Chen and Guestrin first proposed XGBoost model [19]. Since the model came out, it has been noted by data enthusiasts from all over the world. Because the XGBoost model has a direct or continuous system, the best performance solution of the XGBoost model in the running process is to complement the XGBoost model, so XGBoost is the best recommended model in the competition. XGBoost's high performance and low data features can be applied in many ways. XGBoost integrates multiple decision models by using the idea of integration and obtains greater integration ability than the original model. XGBoost has the following three points:First, it supports parallel computing, and the algorithm is fast; second, based on the extraction algorithm, sparse data can be automatically sorted; third, the data can be in batches, and the calculation speed is high. In the XGBoost model, decision trees interact with each other through the principle of addition, as shown in the following formula:(1)y¯=∑k=1KfkXi,fk∈F.The objective function in the algorithm is shown in the following formula:(2)Lφ=∑ily¯,yi+∑kΩfk.For each regression tree, it can be expressed as(3)fk=wqx,w∈RT,q:Rd.The complexity for each tree can be written as(4)Ωfk=γT+12λ∑J=1Twj2.


### 2.2.2. Random Forests

Stochastic forest, proposed by Brayman in 2001, is a machine learning method that uses ensemble learning idea to establish multiple decision tree sets that do not affect each other to solve regression or classification [20]. The weak learner clusters are combined to build a decision tree group. In the sampling mode, we choose the random way to extract the data from the target data set and use the extracted samples to build the basic learner. Generally, we choose CART decision tree as the use scheme of weak learner. The random processing mode of random forest is the random grasping analysis of data. For 1/3 of the data that does not participate in random calculation, it is called out of bag (OOB). Based on these advantages, the whole simulation process in random forest is very close to reality and has high computational efficiency. Spam data can be properly filtered. The modeling steps of stochastic forest model are as follows:Step1:m sample points are randomly selected from the training sample set S to obtain a new S1…Sn subtraining set.Step2: Train a CART regression tree (decision tree) with subtraining set. In the process of training, the segmentation rule for each node is to randomly selectK features from all features and then select the optimal segmentation point from these K features to divide left and right subtrees (the resulting decision trees are binary trees).Step3: Through the second step, many CART regression tree models can be generated.Step4: The final prediction result of each CART regression tree is the mean value of the leaf nodes reached by this sample point.Step5: The final prediction result of the random forest is the mean of the predicted results of all CART regression trees.


### 2.2.3. Support Vector Machines (SVM)

Support Vector Machines are a supervised learning model, which is used for data analysis and pattern recognition and is widely used in classification and regression fields [21]. The mathematical expression of the model construction is as formula (10), where w represents the weight, and c represents the penalty coefficient, where ξ is a relaxation variable. The basic rule of support vector machine is to construct data resources in space vector to form high-dimensional map. Then, the classification or regression task is completed by regression plane. Regression model optimization equation is(5)min12w2+c∑i=1mξi+ξi∗.The general regression expression is shown in the following formula:(6)fx=w,ϕx+b.There are four basic kernel functions in support vector machine [22], which are linear kernel function, Gaussian kernel function, polynomial kernel function, and radial basis function kernel function. The Gaussian kernel function is(7)Kxi,xj=e−1/2σ2xi−xj2.The expression of polynomial kernel function is(8)Kxi,xj=xi,xj+rd.The expression of radial basis kernel function is(9)Kxi,xj=e−γxi−xj2.The expression of linear kernel function is(10)Kx,z=x•z.


## 2.2.1. XGBoost

In 2016, Chen and Guestrin first proposed XGBoost model [19]. Since the model came out, it has been noted by data enthusiasts from all over the world. Because the XGBoost model has a direct or continuous system, the best performance solution of the XGBoost model in the running process is to complement the XGBoost model, so XGBoost is the best recommended model in the competition. XGBoost's high performance and low data features can be applied in many ways. XGBoost integrates multiple decision models by using the idea of integration and obtains greater integration ability than the original model. XGBoost has the following three points:First, it supports parallel computing, and the algorithm is fast; second, based on the extraction algorithm, sparse data can be automatically sorted; third, the data can be in batches, and the calculation speed is high. In the XGBoost model, decision trees interact with each other through the principle of addition, as shown in the following formula:(1)y¯=∑k=1KfkXi,fk∈F.The objective function in the algorithm is shown in the following formula:(2)Lφ=∑ily¯,yi+∑kΩfk.For each regression tree, it can be expressed as(3)fk=wqx,w∈RT,q:Rd.The complexity for each tree can be written as(4)Ωfk=γT+12λ∑J=1Twj2.


## 2.2.2. Random Forests

Stochastic forest, proposed by Brayman in 2001, is a machine learning method that uses ensemble learning idea to establish multiple decision tree sets that do not affect each other to solve regression or classification [20]. The weak learner clusters are combined to build a decision tree group. In the sampling mode, we choose the random way to extract the data from the target data set and use the extracted samples to build the basic learner. Generally, we choose CART decision tree as the use scheme of weak learner. The random processing mode of random forest is the random grasping analysis of data. For 1/3 of the data that does not participate in random calculation, it is called out of bag (OOB). Based on these advantages, the whole simulation process in random forest is very close to reality and has high computational efficiency. Spam data can be properly filtered. The modeling steps of stochastic forest model are as follows:Step1:m sample points are randomly selected from the training sample set S to obtain a new S1…Sn subtraining set.Step2: Train a CART regression tree (decision tree) with subtraining set. In the process of training, the segmentation rule for each node is to randomly selectK features from all features and then select the optimal segmentation point from these K features to divide left and right subtrees (the resulting decision trees are binary trees).Step3: Through the second step, many CART regression tree models can be generated.Step4: The final prediction result of each CART regression tree is the mean value of the leaf nodes reached by this sample point.Step5: The final prediction result of the random forest is the mean of the predicted results of all CART regression trees.


## 2.2.3. Support Vector Machines (SVM)

Support Vector Machines are a supervised learning model, which is used for data analysis and pattern recognition and is widely used in classification and regression fields [21]. The mathematical expression of the model construction is as formula (10), where w represents the weight, and c represents the penalty coefficient, where ξ is a relaxation variable. The basic rule of support vector machine is to construct data resources in space vector to form high-dimensional map. Then, the classification or regression task is completed by regression plane. Regression model optimization equation is(5)min12w2+c∑i=1mξi+ξi∗.The general regression expression is shown in the following formula:(6)fx=w,ϕx+b.There are four basic kernel functions in support vector machine [22], which are linear kernel function, Gaussian kernel function, polynomial kernel function, and radial basis function kernel function. The Gaussian kernel function is(7)Kxi,xj=e−1/2σ2xi−xj2.The expression of polynomial kernel function is(8)Kxi,xj=xi,xj+rd.The expression of radial basis kernel function is(9)Kxi,xj=e−γxi−xj2.The expression of linear kernel function is(10)Kx,z=x•z.


## 3. Optimization of Model Parameters and Analysis of Influencing Factors

### 3.1. Parameter Optimization Method

The effective prediction of data by machine learning has seized the stage in the field of artificial intelligence aided decision-making. It has the inherent advantages of self-learning and dealing with complex nonlinear problems. Manual or automatic input can effectively make the model better train and simulate the fitting ability. The specific form of parameters determines what kind of optimization methods scientists use to optimize their design. Parameter optimization methods often used in data analysis competition and scientific practice include grid search method and gray wolf optimization algorithm. In recent years, gray wolf optimization algorithm stands out among swarm intelligence algorithms for its excellent performance and is widely used in various fields of model parameter adjustment.


#### 3.1.1. Grid Search Method

Using enumeration search method, the searched parameter values are mapped to a multidimensional grid, and a node in the grid represents a fixed combination of parameter values. Using this combination, the performance of the model under this group of parameters is returned. The training process is similar to the exhaustive process, and all nodes of the grid need to be traversed to find the optimal parameters. Based on single training, the parameters are adjusted, and the training time and adjustment accuracy are higher than those of other complex optimization algorithms in the state of few parameters. The grid search method is easy to use, and the evaluation standard is obtained through two-way inspection.


#### 3.1.2. Grey Wolf Optimization

Gray wolf algorithm, proposed by Emary in 2016, is a new intelligent optimization algorithm for simulating the hierarchy and predation behavior of wolf pack system in nature. Wolf population has strict social hierarchy. There are four classes of gray wolves:α,β,δ,ω. High-level α wolves lead other low-level wolves to hunt [23]. The hunting behavior of gray wolves can be defined as(11)D=|C.XPt−Xt.(12)Xt+1=XPt−A.D.Formula (11) represents the distance between individuals and prey, and formula (12) is the position update formula of gray wolves, where t is the current iterative algebra, X and XP are coefficient vectors, and A and C are the position vectors of prey and gray wolf, respectively. Formulae (13) and (14) for A and C are as follows:(13)A=2a.r1−a,(14)C=2.r2.


### 3.2. Characteristic Analysis

#### 3.2.1. Warehouse Analysis

Warehouse management is one of the important links in the supply chain structure. Unreasonable warehouse management will increase the storage cost in large quantities. Calculate the statistical sum of commodity attributes passing through the warehouse and divide the number of orders returned by the warehouse every week with the total number of orders handled by the warehouse every week, so as to get the index of warehouse return rate. The formula can be expressed as(15)St=∑t=1tXi+logd.


#### 3.2.2. Analysis of Purchase Channels

Calculate the weekly sales units, weekly sales, the number of returned pieces in the next week, the number of returned pieces in the next week, and the demand data after each channel, and calculate the return rate based on this. Calculate the number of orders flowing through each incoming channel. The formula can be expressed as(16)Ct=Wd+∑t=1tXi.


#### 3.2.3. Analysis of Distribution Channels

The relationship between distribution channels and warehousing is a many-to-many connection. In the distribution channel link, there may be great differences in the sales volume of a single node, and the sales volume of nodes fluctuates greatly, so it is easy to have unsalable goods, so the return rate of nodes is higher than that of other links analyzed above. Its formula can be expressed as(17)pθ=log2Wdcd+wd.


#### 3.2.4. Customer Analysis

The number of channels corresponding to each customer is counted to form a one-way channel between customers and channels. The number of channels in its supply chain is far less than the number of customers, and different suppliers can use the same channel to supply goods to one customer. The formula can be expressed as(18)Cθ=∑d=1dlogt2−X¯2.


## 3.1. Parameter Optimization Method

The effective prediction of data by machine learning has seized the stage in the field of artificial intelligence aided decision-making. It has the inherent advantages of self-learning and dealing with complex nonlinear problems. Manual or automatic input can effectively make the model better train and simulate the fitting ability. The specific form of parameters determines what kind of optimization methods scientists use to optimize their design. Parameter optimization methods often used in data analysis competition and scientific practice include grid search method and gray wolf optimization algorithm. In recent years, gray wolf optimization algorithm stands out among swarm intelligence algorithms for its excellent performance and is widely used in various fields of model parameter adjustment.


### 3.1.1. Grid Search Method

Using enumeration search method, the searched parameter values are mapped to a multidimensional grid, and a node in the grid represents a fixed combination of parameter values. Using this combination, the performance of the model under this group of parameters is returned. The training process is similar to the exhaustive process, and all nodes of the grid need to be traversed to find the optimal parameters. Based on single training, the parameters are adjusted, and the training time and adjustment accuracy are higher than those of other complex optimization algorithms in the state of few parameters. The grid search method is easy to use, and the evaluation standard is obtained through two-way inspection.


### 3.1.2. Grey Wolf Optimization

Gray wolf algorithm, proposed by Emary in 2016, is a new intelligent optimization algorithm for simulating the hierarchy and predation behavior of wolf pack system in nature. Wolf population has strict social hierarchy. There are four classes of gray wolves:α,β,δ,ω. High-level α wolves lead other low-level wolves to hunt [23]. The hunting behavior of gray wolves can be defined as(11)D=|C.XPt−Xt.(12)Xt+1=XPt−A.D.Formula (11) represents the distance between individuals and prey, and formula (12) is the position update formula of gray wolves, where t is the current iterative algebra, X and XP are coefficient vectors, and A and C are the position vectors of prey and gray wolf, respectively. Formulae (13) and (14) for A and C are as follows:(13)A=2a.r1−a,(14)C=2.r2.


## 3.1.1. Grid Search Method

Using enumeration search method, the searched parameter values are mapped to a multidimensional grid, and a node in the grid represents a fixed combination of parameter values. Using this combination, the performance of the model under this group of parameters is returned. The training process is similar to the exhaustive process, and all nodes of the grid need to be traversed to find the optimal parameters. Based on single training, the parameters are adjusted, and the training time and adjustment accuracy are higher than those of other complex optimization algorithms in the state of few parameters. The grid search method is easy to use, and the evaluation standard is obtained through two-way inspection.


## 3.1.2. Grey Wolf Optimization

Gray wolf algorithm, proposed by Emary in 2016, is a new intelligent optimization algorithm for simulating the hierarchy and predation behavior of wolf pack system in nature. Wolf population has strict social hierarchy. There are four classes of gray wolves:α,β,δ,ω. High-level α wolves lead other low-level wolves to hunt [23]. The hunting behavior of gray wolves can be defined as(11)D=|C.XPt−Xt.(12)Xt+1=XPt−A.D.Formula (11) represents the distance between individuals and prey, and formula (12) is the position update formula of gray wolves, where t is the current iterative algebra, X and XP are coefficient vectors, and A and C are the position vectors of prey and gray wolf, respectively. Formulae (13) and (14) for A and C are as follows:(13)A=2a.r1−a,(14)C=2.r2.


## 3.2. Characteristic Analysis

### 3.2.1. Warehouse Analysis

Warehouse management is one of the important links in the supply chain structure. Unreasonable warehouse management will increase the storage cost in large quantities. Calculate the statistical sum of commodity attributes passing through the warehouse and divide the number of orders returned by the warehouse every week with the total number of orders handled by the warehouse every week, so as to get the index of warehouse return rate. The formula can be expressed as(15)St=∑t=1tXi+logd.


### 3.2.2. Analysis of Purchase Channels

Calculate the weekly sales units, weekly sales, the number of returned pieces in the next week, the number of returned pieces in the next week, and the demand data after each channel, and calculate the return rate based on this. Calculate the number of orders flowing through each incoming channel. The formula can be expressed as(16)Ct=Wd+∑t=1tXi.


### 3.2.3. Analysis of Distribution Channels

The relationship between distribution channels and warehousing is a many-to-many connection. In the distribution channel link, there may be great differences in the sales volume of a single node, and the sales volume of nodes fluctuates greatly, so it is easy to have unsalable goods, so the return rate of nodes is higher than that of other links analyzed above. Its formula can be expressed as(17)pθ=log2Wdcd+wd.


### 3.2.4. Customer Analysis

The number of channels corresponding to each customer is counted to form a one-way channel between customers and channels. The number of channels in its supply chain is far less than the number of customers, and different suppliers can use the same channel to supply goods to one customer. The formula can be expressed as(18)Cθ=∑d=1dlogt2−X¯2.


## 3.2.1. Warehouse Analysis

Warehouse management is one of the important links in the supply chain structure. Unreasonable warehouse management will increase the storage cost in large quantities. Calculate the statistical sum of commodity attributes passing through the warehouse and divide the number of orders returned by the warehouse every week with the total number of orders handled by the warehouse every week, so as to get the index of warehouse return rate. The formula can be expressed as(15)St=∑t=1tXi+logd.


## 3.2.2. Analysis of Purchase Channels

Calculate the weekly sales units, weekly sales, the number of returned pieces in the next week, the number of returned pieces in the next week, and the demand data after each channel, and calculate the return rate based on this. Calculate the number of orders flowing through each incoming channel. The formula can be expressed as(16)Ct=Wd+∑t=1tXi.


## 3.2.3. Analysis of Distribution Channels

The relationship between distribution channels and warehousing is a many-to-many connection. In the distribution channel link, there may be great differences in the sales volume of a single node, and the sales volume of nodes fluctuates greatly, so it is easy to have unsalable goods, so the return rate of nodes is higher than that of other links analyzed above. Its formula can be expressed as(17)pθ=log2Wdcd+wd.


## 3.2.4. Customer Analysis

The number of channels corresponding to each customer is counted to form a one-way channel between customers and channels. The number of channels in its supply chain is far less than the number of customers, and different suppliers can use the same channel to supply goods to one customer. The formula can be expressed as(18)Cθ=∑d=1dlogt2−X¯2.


## 4. Experimental Simulation Analysis

### 4.1. Data Preparation

Data is the core content of the development of the information age. In order to protect their own interests, companies refuse to share relevant supply chain or inventory production data, which makes it difficult to obtain the data of this study. This paper selects a part of the data about G Company’s food supply chain on Kaggle, a big data competition platform, as the experimental data of this paper.


### 4.2. Modeling

XGBoost modeling and analysis should first screen the input variables, fully mine the demand fluctuation information contained in the known variables, use the known variables for feature engineering design, and complete the construction of new input variables. The characteristic variablen is the statistics of the behavior times of the customer purchasing this kind of product in the previous week, j represents the j-th purchase of this kind of product in the previous week, and v (t) represents the second manual input variable created as (19)vt=∑j=1nmi−1n.w (t) denotes the frequency of user usage in week t as (20)wt=∑o=1pin.For logarithmic variations, transform the logarithmically transformed requirements as shown in (21). The final results of the model are shown exponentially as (21)yt=eyt.Modeling and analysis of stochastic forest stochastic forest have high tolerance to redundant variables and can complete the modeling of samples with missing or abnormal values. At the same time, because of its integration idea in modeling, the model shows strong stability in classification and regression tasks. The initial model of random forest is constructed by using the input variables constructed above, wherem represents the maximum feature number index, and N represents the total number of features of the input variables as (22)m=log2N.Support vector machine modeling and analysis researchers regard support vector machine as a technical black box and can quickly model and analyze the target data set after preliminary cleaning and processing. Integrate data to avoid the influence of dimension difference. The integrated usage method is shown in(23)pi=pi−pminpmax−pmin.Through reading the literature, it is found that the evaluation indexes of demand forecasting model mainly adopt Mean Absolute Error (MEA), Root Mean Square Error (RMSE), Mean Absolute Percentage Error (MAPE), and Spielman correlation coefficient [24]. However, due to the occurrence of zero node demand, this paper uses indexes other than Spielman coefficient to evaluate the prediction performance of the model.The average absolute errors of the three models with training times are shown in Figure2:Figure 2
Average absolute error diagram.Overall, XGBoost and stochastic forest model outperform support vector machine model in this supply chain data set. In terms of average absolute error, the value of XGBoost is slightly lower than that of random forest, indicating that the approximate simulation degree is close, but the value of SVM is much higher than them, indicating that the accuracy of prediction analysis is slightly poor.The RMSE training times of the three models are shown in Figure3:Figure 3
Root Mean Square Error diagram.The difference between the three models is very large in the Root Mean Square Error. XGBoost model also appears in the statistic list in the form of minimum value, which represents that the predicted value of this model in the discrete degree in the test sample data is approximately equivalent to the actual value, which confirms the reliability of XGBoost prediction. The performance of stochastic forest model in this index is slightly inferior to XGBoost model, but the processing ability of discrete points is obviously better than that of support vector machine.The average absolute percentage error of the three models with training times is shown in Figure4:Figure 4
Average absolute percentage error chart.MAPE is used to describe the correlation degree between predicted value and real value. The closer it is to 1, the greater the correlation between the two sequences is, and the more accurate the prediction result of the model is. As can be seen from Figure4, XGBoost and stochastic forest model have similar fitting ability to supply chain demand sequence. Compared with the other two models, the value of SVM is relatively low, which may be due to the wrong way of processing redundant data in SVM. A large amount of redundant data makes SVM mistakenly select redundant data as support vector data in the training process.


### 4.3. Combination Forecasting

In the existing literature, it is mentioned that the combination analysis of different attribute models can improve the overall performance of the models. In this paper, the prediction performance of the model in the validation data set is used as the basis for judging the weight of combination forecasting. The judgment method is shown in(24)wk=1/ek∑1n1/ei.Performing and combining the three models, four combination models are obtained. Combination model 1 is completed under the combined effect of the prediction performance of the three models. Combination model 2 is completed by integrating the prediction results of XGBoost and stochastic forest model. Combination model 3 is the combination of XGBoost support vector machine model, and combination model 4 is the combination of stochastic forest and support vector machine model. The prediction effect of the combined model in the test set is drawn as a scatter line chart. The MEA, RMSE, and MAPE of the four combinations with training times are shown in Figures5–7, respectively.Figure 5
Average absolute error diagram of four combinations.Figure 6
Root Mean Square Error diagram of four combinations.Figure 7
Average absolute percentage error diagram of four combinations.From Figures5–7, it can be found that the prediction results of MEA, RMSE, and MAPE are integrated. Combination model 1 obtains better prediction effect than the previous optimal XGBoost model. However, combination model 2, which combines XGBoost and random forest, has higher average prediction accuracy than the previous optimal single model on the test data set. However, from the degree of dealing with discrete values, it can be found that the combination model does not inherit the good fitting performance from XGBoost model in this respect. MAPE shows that combination model 2 has better prediction ability in overall prediction. As for combination model 3 and combination model 4, when the two models are simply combined, the weight of the model with large error cannot be reduced to a very low level, which is the main reason for the poor performance of the combination model.


## 4.1. Data Preparation

Data is the core content of the development of the information age. In order to protect their own interests, companies refuse to share relevant supply chain or inventory production data, which makes it difficult to obtain the data of this study. This paper selects a part of the data about G Company’s food supply chain on Kaggle, a big data competition platform, as the experimental data of this paper.


## 4.2. Modeling

XGBoost modeling and analysis should first screen the input variables, fully mine the demand fluctuation information contained in the known variables, use the known variables for feature engineering design, and complete the construction of new input variables. The characteristic variablen is the statistics of the behavior times of the customer purchasing this kind of product in the previous week, j represents the j-th purchase of this kind of product in the previous week, and v (t) represents the second manual input variable created as (19)vt=∑j=1nmi−1n.w (t) denotes the frequency of user usage in week t as (20)wt=∑o=1pin.For logarithmic variations, transform the logarithmically transformed requirements as shown in (21). The final results of the model are shown exponentially as (21)yt=eyt.Modeling and analysis of stochastic forest stochastic forest have high tolerance to redundant variables and can complete the modeling of samples with missing or abnormal values. At the same time, because of its integration idea in modeling, the model shows strong stability in classification and regression tasks. The initial model of random forest is constructed by using the input variables constructed above, wherem represents the maximum feature number index, and N represents the total number of features of the input variables as (22)m=log2N.Support vector machine modeling and analysis researchers regard support vector machine as a technical black box and can quickly model and analyze the target data set after preliminary cleaning and processing. Integrate data to avoid the influence of dimension difference. The integrated usage method is shown in(23)pi=pi−pminpmax−pmin.Through reading the literature, it is found that the evaluation indexes of demand forecasting model mainly adopt Mean Absolute Error (MEA), Root Mean Square Error (RMSE), Mean Absolute Percentage Error (MAPE), and Spielman correlation coefficient [24]. However, due to the occurrence of zero node demand, this paper uses indexes other than Spielman coefficient to evaluate the prediction performance of the model.The average absolute errors of the three models with training times are shown in Figure2:Figure 2
Average absolute error diagram.Overall, XGBoost and stochastic forest model outperform support vector machine model in this supply chain data set. In terms of average absolute error, the value of XGBoost is slightly lower than that of random forest, indicating that the approximate simulation degree is close, but the value of SVM is much higher than them, indicating that the accuracy of prediction analysis is slightly poor.The RMSE training times of the three models are shown in Figure3:Figure 3
Root Mean Square Error diagram.The difference between the three models is very large in the Root Mean Square Error. XGBoost model also appears in the statistic list in the form of minimum value, which represents that the predicted value of this model in the discrete degree in the test sample data is approximately equivalent to the actual value, which confirms the reliability of XGBoost prediction. The performance of stochastic forest model in this index is slightly inferior to XGBoost model, but the processing ability of discrete points is obviously better than that of support vector machine.The average absolute percentage error of the three models with training times is shown in Figure4:Figure 4
Average absolute percentage error chart.MAPE is used to describe the correlation degree between predicted value and real value. The closer it is to 1, the greater the correlation between the two sequences is, and the more accurate the prediction result of the model is. As can be seen from Figure4, XGBoost and stochastic forest model have similar fitting ability to supply chain demand sequence. Compared with the other two models, the value of SVM is relatively low, which may be due to the wrong way of processing redundant data in SVM. A large amount of redundant data makes SVM mistakenly select redundant data as support vector data in the training process.


## 4.3. Combination Forecasting

In the existing literature, it is mentioned that the combination analysis of different attribute models can improve the overall performance of the models. In this paper, the prediction performance of the model in the validation data set is used as the basis for judging the weight of combination forecasting. The judgment method is shown in(24)wk=1/ek∑1n1/ei.Performing and combining the three models, four combination models are obtained. Combination model 1 is completed under the combined effect of the prediction performance of the three models. Combination model 2 is completed by integrating the prediction results of XGBoost and stochastic forest model. Combination model 3 is the combination of XGBoost support vector machine model, and combination model 4 is the combination of stochastic forest and support vector machine model. The prediction effect of the combined model in the test set is drawn as a scatter line chart. The MEA, RMSE, and MAPE of the four combinations with training times are shown in Figures5–7, respectively.Figure 5
Average absolute error diagram of four combinations.Figure 6
Root Mean Square Error diagram of four combinations.Figure 7
Average absolute percentage error diagram of four combinations.From Figures5–7, it can be found that the prediction results of MEA, RMSE, and MAPE are integrated. Combination model 1 obtains better prediction effect than the previous optimal XGBoost model. However, combination model 2, which combines XGBoost and random forest, has higher average prediction accuracy than the previous optimal single model on the test data set. However, from the degree of dealing with discrete values, it can be found that the combination model does not inherit the good fitting performance from XGBoost model in this respect. MAPE shows that combination model 2 has better prediction ability in overall prediction. As for combination model 3 and combination model 4, when the two models are simply combined, the weight of the model with large error cannot be reduced to a very low level, which is the main reason for the poor performance of the combination model.


## 5. Conclusion

By modeling and analyzing the data of G Company's food supply chain, the machine learning model is used to intelligently predict the supply chain structure, and the main achievements are as follows: (1) we carry out correlation analysis and variable screening on data sets, and screen for correlation relations, determine variables, and select them. Using characteristic analysis, we find that there are a lot of jumbled data in the demand data of supply chain nodes, and there are key nodes in the supply chain. Accurate analysis of them can help decision makers understand the real overall demand in the supply chain. (2) Model introduction and parameter automatic optimization: three mature machine learning prediction models are introduced to train and predict the demand data of supply chain nodes, and the appropriate optimization methods are selected according to the characteristics of their models to complete the automatic adjustment of parameters. (3) Model combination and weight determination: there are some differences in forecasting performance of a single model on different data sets. Introducing model combination can minimize the forecasting error caused by the characteristics of the model itself and ensure the accuracy of final demand forecasting. (4) Model evaluation and statistical indicators: the model evaluation system is introduced, which is convenient to predict the model quickly and intuitively. It is convenient for scholars to introduce and evaluate new models in the future, so that the field of supply chain forecasting can develop rapidly and shorten the gap between this discipline and other advanced forecasting fields. Only by establishing a scientific and systematic demand forecasting framework can we fundamentally improve the quality of demand forecasting, reduce the backlog of inventory, and improve the overall benefit and efficiency of supply chain. In addition, through data simulation and parameter optimization, four supply chain characteristics are put into the model for simulation training for many times, and the three error numbers of MAE, RMSE, and MAPE of the model are analyzed to judge the reliability of the model. On this basis, through the combination of models, it is determined that the average percentage error of the combination of the three models is higher than that of the other pairwise combinations, reaching 0.937, which completes the expectation of intelligent prediction of supply chain structure. Furthermore, this paper uses Kaggle's existing data set to analyze the supply chain demand. The sampling standard and frequency of this data set are different from those collected in other environments. In the next stage, supply chain demand data sets with other attributes can be used to further verify the effectiveness of the model.



---

*Source: 4116497-2021-11-27.xml*