# Bayesian Network Demand-Forecasting Model Based on Modified Particle Swarm Optimization
## 1 Introduction
### Review of Demand Forecasting  
Demand is the source of production and supply. Many scholars have shown that demand forecasting plays a key role in a company's operational decision-making [3, 4, 5, 6, 7], and a large number of scholars have studied how to make accurate demand forecasting. From the perspective of modeling, some scholars have established parametric models and obtained the fixed parameters of the model by training and fitting the historical data so asto predict the future demand. Some scholars established a nonparametric model, regarded the model parameters as random variables, obtained different parameters at different times through the training of historical data, and then predicted the future demand. Most of the existing studies based on parametric models were constructed from the perspective of time series prediction. The commonly used methods include the ARIMA method [8; 9; 10; 11; 12; 13; 14; 15] and exponential smoothing method [16; 17; 18; 19]. In order to solve the nonlinear problems that may exist in the time series model, many scholars have improved the ARIMA method under different problem backgrounds, such as the nonlinear ARIMA time series model considering seasonal factors [10; 11; 12; 13] and the combination forecasting method combined with computational intelligence methods [14; 15]. Based on the network graph theory combined with the four attributes of the product, [PERSON] et al. proposed an autoregressive integrated moving average model (ARIMAX) with exogenous variables to predict the sales of cosmetics. The prediction results were compared with the Croston method and the ARIMA method, and better results were obtained [20]. These methods have achieved good prediction results. However, at present, there are many kinds of products, some of which show a low level of demand, as well as many periodic promotional activities, and the demand shows intervals and strong volatility. [PERSON] and [PERSON] cited an example where the average number of purchases of an item by a customer was 1.32 occasions per year, and \"For the slower movers, the average number of purchases was only 1.06 per item [per] customer\" [21]. For interval demand forecasting, the most classic method is the Croston method, which calculates the expected demand for the next period, that is, the ratio of the expected non-zero demand to the expected non-zero-demand time interval, both of which are estimated by simple exponential smoothing [22]. In general, if the parameter model is specified incorrectly, that is, the data seriously violates its basic model assumptions, it may lead to inconsistent predictions and ultimately lead to inappropriate inferences and suboptimal recommendations. A misspecified Bayesian model can yield an ill-behaved asymptotic posterior distribution [23; 24; 25]. The work in [26] finds that the outperformance of nonparametric methods increases with higher demand variability. The nonparametric model has the ability to accommodate infinite attributes and infinite levels in theory, which can meet the needs of complex system characterization. [PERSON] et al. proposed the state space model and distribution prediction. The model tracks the expected demand by exponential-smoothing updates, assumes that the demand follows a negative binomial distribution, and uses the maximum-likelihood method to estimate the model parameters [27]. On the basis of [PERSON], [PERSON] proposed Bayesian inference model H-NBSS for count-type time series. In order to adapt to the characteristics of counting data, H-NBSS uses the counting process as the statistical prior of the data, which makes the solution of the model very difficult. In addition, due to the characteristics of the counting process itself, H-NBSS is also extremely sensitive to the results of parameter adjustment, and subtle changes in model parameters may also lead to great fluctuations in prediction results [28]. Assuming that the demand distribution is a multistage Poisson distribution, [PERSON] et al. constructed a nonparametric Bayesian model [2]. [PERSON] et al.