## 2 Materials and Methods
### Traffic Condition Prediction Model
#### 2.4.3 BP Neural Network  
The BP neural network is a type of multi-layer feedforward neural network proposed by [PERSON] in 1986 and is one of the most widely used neural networks. The BP neural network consists of an input layer, a hidden layer, and an output layer, each layer containing several neurons, with each neuron receiving signals only from the neurons in the previous layer and having no connection with the neurons in the same layer. In 1989, [PERSON] proved the universal approximation theorem of the BP neural network, which states that any continuous function on a closed interval can be approximated by a BP network with only one hidden layer. Therefore, a three-layer (input layer, hidden layer, and output layer) BP neural network can complete the mapping from any dimension to any other dimension. The following Figure 3 shows a typical 3-layer BP neural network model.  
Figure 3: The framework of BP neural network.  
* Forward propagation process Assuming that \(i\) denotes input neurons, \(j\) represents hidden neurons, \(k\) represent output neurons, for a certain input \(x_{k}\), the output of the network is \(y_{k}\), the output of node \(i\) is \(o_{i}\), and \(W_{ji}\) is the connection weight. The input of hidden node \(j\): \[net_{j}=\sum_{i}W_{ji}O_{i}\] (9) The output of hidden layer node \(j\): \[O_{j}=f\big{(}net_{j}\big{)}\] (10) The input of output layer node \(k\): \[net_{k}=\sum_{j}W_{kj}O_{k}\] (11) The output of node \(k\): \[O_{k}=f(net_{k})\] (12) The \(f(x)\) represents the activate function and, in this paper, we use sigmoid function as follows: \[f(x)=\frac{1}{1+e^{-ax}},\ (0<f(x)<1)\] (13) After the above forward propagation process, the BP neural network completes the approximate mapping from an n-dimensional space to an m-dimensional space.
* Backpropagation process The essence of the backpropagation process is the search for weight vectors, which requires continuously iterating to minimize the error function. When the difference between the actual output of the network and the expected output does not meet the expectations, an error signal is generated and propagated from the output end to the input end. During the propagation process, the network dynamically adjusts the network weights based on the error signal feedback to continuously reduce the difference between the actual and expected output values. Assuming that number of samples are \(p\), after the \(p\) sample is input to the network, the output \(O_{pk}\) is obtained, and the expected output is \(t_{pk}\). If the square error function is used, then the error of the \(p\) sample is \(E_{p}\): \[E_{p}=\frac{1}{2}{\sum_{k=1}^{n}}\Big{(}t_{pk}-O_{pk}\Big{)}^{2}\] (14) The global error of the samples: \[E=\sum_{p}E_{p}\] (15)
* Advantages of BP neural networks As an artificial intelligence model, one of the most significant features that distinguishes BP neural networks from statistical regression models is that it does not require any assumptions. It can map the relationship between n-dimensional input variables and m-dimensional output variables as long as there are enough samples. The mathematical theory has proven that BP networks can approximate any complex function through the combination of simple nonlinear processing units. When the BP network encounters test samples that were not present in the training samples, it can still make correct predictions, and this ability is known as the model's generalization ability. The BP neural network has strong generalization ability and therefore has high practical value. In some cases, there may be errors in traffic accident samples due to the large sample size, making it difficult to avoid such errors in the data. However, because BP neural networks are less affected by the global mapping capability of the network when only a few local neurons are damaged, they can achieve accurate predictions even with a small amount of error in traffic accident data.