Computational Intelligence and Neuroscience / 2018 / Article / Alg 1

Research Article

Particle Swarm Optimization-Based Support Vector Regression for Tourist Arrivals Forecasting

Algorithm 1

Particle swarm optimization algorithm.
(1)Define: let f() be the fitness function, N is the number of particles, D is the number of dimensions, xi and are the position and velocity of each particle, respectively, is the best known position of particle i, and is the best known position of the entire swarm.
(2)Output: // the optimal solution
(3)// initialize the swarm
(4)for i ⟵ 1 to N do // each particle
(5)for d ⟵ 1 to D do // each dimension
(6)   // lb and ub are the lower and upper boundaries of the search space
(7)  
(8)end
(9) ⟵ xi
(10)if then
(11)  
(12)end
(13)end
(14)while iter < max_iter do // iterate until termination criterion met
(15)for i ⟵ 1 to N do
(16)  for d ⟵ 1 to D do
(17)   r1 ⟵ rand (0, 1); r2 ⟵ rand (0, 1)
(18)   wvi,d+c1r1 ( – xi,d) +c2r2 ( – xi,d) // update the particle’s velocity
(19)  End
(20)  xixi+ // update the particle’s position
(21)  if f (xi) <f () then // compare particle’s best position
(22)   xi
(23)   if f () <f () then // compare swarm’s best position to current particle’s position
(24)    
(25)   End
(26)  End
(27)End
(28) − ( − ) × iter/max_iter // decrease inertia weight
(29) iter ⟵ iter + 1
(30)end

We are committed to sharing findings related to COVID-19 as quickly and safely as possible. Any author submitting a COVID-19 paper should notify us at help@hindawi.com to ensure their research is fast-tracked and made available on a preprint server as soon as possible. We will be providing unlimited waivers of publication charges for accepted articles related to COVID-19. Sign up here as a reviewer to help fast-track new submissions.