# Inversion of Forest Biomass Based on Multi-Source Remote Sensing Images
## 2 Materials and Methods
### Data Preprocessing
#### 2.3.7 Establishment of BP Neural Network Model Improved by Particle Swarm Optimization  
Particle swarm optimization (PSO) has the advantages of fast convergence speed, few parameters, a simple algorithm and easy implementation. Particle swarm optimization (PSO) simulates the predation behavior of birds. Imagine a scenario where a flock of birds randomly searches for food. There is only one piece of food in this area. All the birds do not know where the food is. But they know how far the food is from their current location. So, what is the best strategy for finding food? The easiest and most efficient way is to search the area around the bird that is currently closest to the food. Throughout the search, the flock lets other birds know where it is by passing messages to each other. Through such cooperation, they can judge whether the optimal solution has been found, and at the same time convey the information of the optimal solution. For the whole flock of birds, eventually the whole flock of birds can gather around the food source, that is, find the optimal solution.  
In PSO, the solution to each optimization problem is a bird in the search space. We call them \"particles\". All particles have a fitness value determined by the optimized function, and each particle has a velocity that determines the direction and distance they fly. Then, the particles follow the current optimal particle to search in the solution space. PSO is initialized as a group of random particles (random solutions). The optimal solution is then found through iteration. In each iteration, the particle updates itself by tracking two \"extrema\". The first is the optimal solution found by the particle itself, which is called the individual extremum pBest. Another extremum is the optimal solution currently found by the entire population, and this extremum is the global extremum gBest. In addition, instead of the whole population, only a part of it can be used as the neighbor of the particle; then, the extremum among all the neighbors is the local extremum.  
There are two properties of particles: velocity and position. Velocity represents the direction and distance the particle will move in the next iteration, and position is a solution to the problem being solved.  
The algorithm has 6 important parameters: the position of the i-th particle; the velocity of the i-th particle (the distance and direction the particle travels); the optimal position of the i-th particle (individual optimal solution); the optimal position of the group search (the group optimal solution); the fitness value of the optimal position searched by the i-th particle (the value of the optimization objective function); the adaptive value of the optimal location searched by the group.  
The specific algorithm flow is as follows:  
1. Initialize a group of particles (the group size is N), including random positions and velocities;
2. Evaluate the fitness of each particle;
3. For each particle, compare its fitness value with the best position pbest it has passed, and if it is better, use it as the current best position pbest;
4. For each particle, compare its fitness value with its best position gbest, and if it is better, use it as the current best position gbest;
5. Adjust particle velocity and position;
6. If the end condition is not met, go to step 2.  
The iteration termination condition is generally selected as the maximum number of iterations and/or the optimal position searched so far by the particle swarm meets the predetermined minimum adaptation threshold according to the specific problem.