Research Article
An Energy Efficient Evolutionary Approach for Smart City-Based IoT Applications
Algorithm 1
Pseudocode for FFNN training using PSO.
Initialization of , , , , , | While < = do | 1. Map into W and b | 2. Evaluate Equations 11 and 12. This phase is called training of FFNN | 3: Fitness (i.e., FFNN error or MSE) can be obtained using Equation 1. | if pBestScore > Fitness then | | pBestScore = Fitness and pBestPosition = x. | Else | End | If gBestScore > fitness then | | gBestScore = Fitness and gBestPosition = x. | Else | End | 4: Now calculate w by using Equation 11. | 5: Update velocity and position of particles according to Equations 11 and 12, respectively. | End | Final: PSO’s best particle positions (pBest) are the (W and b) for FFNN. |
|