# COVID-19 Outbreak Prediction with Machine Learning
## 2 Materials and Methods
### Evolutionary Algorithms
#### 2.1.2 Particle Swarm Optimization (PSO)  
In 1995, [PERSON] and [PERSON] [60] introduced the PSO as an uncertain search method for optimization purposes. The algorithm was inspired by the mass movement of birds looking for food. A group of birds accidentally look for food in a space. There is only one piece of food in the search space. Each solution in PSO is called a particle, which is equivalent to a bird in the bird's mass movement algorithm. Each particle has a value that is calculated by a competency function which increases as the particle in the search space approaches the target (food in the bird's movement model). Each particle also has a velocity that guides the motion of the particle. Each particle continues to move in the problem space by tracking the optimal particles in the current state [61; 62; 63]. The PSO method is rooted in [PERSON] work, which is an early simulation of the social behavior of birds. The mass of particles in nature represents collective intelligence. Consider the collective movement of fish in water or birds during migration. All members move in perfect harmony with each other, hunt together if they are to be hunted, and escape from the clutches of a predator by moving toward other prey if they are preyed upon [64; 65; 66]. Particle properties in this algorithm include [67; 68; 66]:  
* Each particle independently looks for the optimal point.
* Each particle moves at the same speed at each step.
* Each particle remembers its best position in the space.
* The particles work together to inform each other of the places they are looking for.
* Each particle is in contact with its neighboring particles.
* Every particle is aware of the particles that are in the neighborhood.
* Every particle is known as one of the best particles in its neighborhood.  
The PSO implementation steps can be summarized as: the first step establishes and evaluates the primary population. The second step determines the best personal memories and the best collective memories. The third step updates the speed and position. If the conditions for stopping are not met, the cycle will return to the second step.  
The PSO algorithm is a population-based algorithm [69; 70]. This property makes it less likely to be trapped in a local minimum. This algorithm operates according to possible rules, not definite rules. Therefore, PSO is a random optimization algorithm that can search for unspecified and complex areas. This makes PSO more flexible and durable than conventional methods. PSO deals with non-differential target functions because the PSO uses the information result (performance index or target function to guide the search in the problem area). The quality of the proposed route response does not depend on the initial population. Starting from anywhere in the search space, the algorithm ultimately converges on the optimal answer. PSO has great flexibility to control the balance between the local and overall search space. This unique PSO property overcomes the problem of improper convergence and increases the search capacity. All of these features make PSO different from the GA and other innovative algorithms [62; 66; 68].  
In the present study, PSO was employed for estimation of the parameters of Equations (6) to (13). The population number was selected to be 1000 and the iteration number was determined to be 500 according to different trial and error processes to reduce the cost function value. The cost function was defined as the mean square error between the target and estimated values according to Equation (14).