Research Article

Research on SVR Water Quality Prediction Model Based on Improved Sparrow Search Algorithm

Algorithm 1

Improved sparrow search algorithm.
Initialization:
 Initialize the population to by using (6);
 Give the population size N;
 Give the number of iterations T;
 Give the search space dimension D;
 Give the proportion of the discoverer DP
 Give the proportion of the warner WP
 Calculate the fitness of individuals in the population, and record the global optimal position , the global optimal fitness value , the global worst position , and the global worst fitness value .
Iteration: While(t<T)
(1)Calculate the warning value ;
(2)for each :
(3)Update the position of the discoverer with top DP fitness by using (1);
(4)Update the position of the joiner with the rest fitness by using (2);
(5)Update the position of the watcher by randomly selecting WP of the individuals by using (3);
(6)end for;
(7)Calculate the fitness of the population individuals after the location update and sort them, and calculate formula (7) to eliminate the last individuals in the sort;
(8)Use (8) to add new individuals to the population to form a new population, and calculate the fitness again;
(9)If the new position is better than the old position, the old position is updated;
(10);
(11)return, .