| Literature DB >> 34887483 |
Peng Qin1,2, Hongping Hu3, Zhengmin Yang3.
Abstract
Grasshopper optimization algorithm (GOA) proposed in 2017 mimics the behavior of grasshopper swarms in nature for solving optimization problems. In the basic GOA, the influence of the gravity force on the updated position of every grasshopper is not considered, which possibly causes GOA to have the slower convergence speed. Based on this, the improved GOA (IGOA) is obtained by the two updated ways of the position of every grasshopper in this paper. One is that the gravity force is introduced into the updated position of every grasshopper in the basic GOA. And the other is that the velocity is introduced into the updated position of every grasshopper and the new position are obtained from the sum of the current position and the velocity. Then every grasshopper adopts its suitable way of the updated position on the basis of the probability. Finally, IGOA is firstly performed on the 23 classical benchmark functions and then is combined with BP neural network to establish the predicted model IGOA-BPNN by optimizing the parameters of BP neural network for predicting the closing prices of the Shanghai Stock Exchange Index and the air quality index (AQI) of Taiyuan, Shanxi Province. The experimental results show that IGOA is superior to the compared algorithms in term of the average values and the predicted model IGOA-BPNN has the minimal predicted errors. Therefore, the proposed IGOA is an effective and efficient algorithm for optimization.Entities:
Year: 2021 PMID: 34887483 PMCID: PMC8660903 DOI: 10.1038/s41598-021-03049-6
Source DB: PubMed Journal: Sci Rep ISSN: 2045-2322 Impact factor: 4.379
Unimodal functions with dimension .
| The function expression | Dim | Range | |
|---|---|---|---|
| 30 | [− 100, 100] | 0 | |
| 30 | [− 10, 10] | 0 | |
| 30 | [− 100, 100] | 0 | |
| 30 | [− 100, 100] | 0 | |
| 30 | [− 30, 30] | 0 | |
| 30 | [− 100, 100] | 0 | |
| 30 | [− 1.28, 1.28] | 0 |
Multimodal functions with dimension .
| The function expression | Dim | Range | |
|---|---|---|---|
| 30 | [− 500, 500] | ||
| 30 | [− 5.12, 15.12] | 0 | |
| 30 | [− 32, 32] | 0 | |
| 30 | [− 600, 600] | 0 | |
| 30 | [− 50, 50] | 0 | |
| 30 | [− 50, 50] | 0 |
Benchmark functions with fixed dimension.
| The function expression | Dim | Range | |
|---|---|---|---|
| 2 | [− 65.536, 65.536] | 0.998 | |
| 4 | [− 5, 5] | 0.0030 | |
| 2 | [− 5, 5] | − 1.0316 | |
| 2 | 0.398 | ||
| 2 | [− 2, 2] | 3 | |
| 3 | [0, 1] | − 3.86 | |
| 6 | [0, 1] | − 3.32 | |
| 4 | [0, 10] | − 10.1532 | |
| 4 | [0, 10] | − 10.4028 | |
| 4 | [0, 10] | − 10.5363 |
Figure 13D version of the benchmark functions (using Matlab R2018a and www.mathworks.com).
The setup parameters, where is the current iteration and is the maximal iteration.
| Algorithm | Parameters | Value |
|---|---|---|
| IGOA | Adaptive parameter | |
| Acceleration coefficient | ||
| Gravitational constant | ||
| GOA | Adaptive parameter | |
| PSO | Inertia weight | |
| Acceleration coefficient | ||
| Acceleration coefficient | ||
| MFO | Constant | |
| SCA | Random number | |
| SSA | Random number | |
| MVO | Wormhole existence probability (WEP) | |
| Travelling distance rate (TDR) | ||
| DA | Inertia weight | |
| separation weight | ||
| alignment weight | ||
| the cohesion weight | ||
| food factor | ||
| enemy factor |
The average values and the standard deviations of the optimal function values of these 23 benchmark functions.
| IGOA | GOA | PSO | MFO | SCA | SSA | MVO | DA | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Mean | Std | Mean | Std | Mean | Std | Mean | Std | Mean | Std | Mean | Std | Mean | Std | Mean | Std | |
| 4.9537E−03 | 6.2281E−03 | 3.1911E+01 | 2.0615E+01 | 4.9941E−01 | 1.4460E−01 | 2.6715E+03 | 5.2062E+03 | 1.1073E+01 | 1.1939E+01 | 6.0995E−07 | 1.3385E+00 | 4.1450E−01 | 9.9436E+00 | 1.8544E+01 | ||
| 2.9389E−01 | 1.8954E−01 | 1.6903E+01 | 2.1972E+01 | 4.8178E+00 | 1.5802E+00 | 3.5520E+01 | 1.8203E+01 | 2.9848E−02 | 2.0891E+00 | 1.5520E+00 | 1.3798E+01 | 3.1026E+01 | 1.3874E+00 | 9.3868E−01 | ||
| 3.0511E−02 | 3.2628E+03 | 1.6774E+03 | 1.2995E+03 | 1.9513E+03 | 1.8412E+04 | 1.1221E+04 | 9.0526E+03 | 6.9092E+03 | 1.3980E+03 | 7.8768E+02 | 2.1071E+02 | 9.9252E+01 | 2.4895E+02 | 3.4807E+02 | ||
| 1.3662E−02 | 1.3897E+01 | 3.7187E+00 | 2.5083E+00 | 1.2029E+00 | 7.0112E+01 | 7.3626E+00 | 3.7143E+01 | 1.1490E+01 | 1.1536E+01 | 4.7205E+00 | 2.1187E+00 | 8.0179E−01 | 2.5779E+00 | 1.5221E+00 | ||
| 8.3759E−01 | 5.0144E+03 | 7.5023E+03 | 2.0108E+02 | 1.6903E+02 | 2.6751E+06 | 1.4594E+07 | 1.3358E+05 | 3.8131E+05 | 3.6123E+02 | 6.0996E+02 | 5.6637E+02 | 8.1742E+02 | 5.3597E+03 | 1.3222E+04 | ||
| 2.0048E+00 | 5.6584E−01 | 5.0258E+01 | 3.9565E+01 | 7.0795E−01 | 2.2043E−01 | 2.3351E+03 | 5.0201E+03 | 1.4226E+01 | 2.3036E+01 | 2.0707E−07 | 1.1966E+00 | 4.2627E−01 | 9.7154E+00 | 1.5394E+01 | ||
| 1.2312E−02 | 4.8498E−02 | 1.9798E−02 | 2.6354E−01 | 1.1254E−01 | 4.9555E+00 | 6.8998E+00 | 8.6843E−02 | 7.5080E−02 | 1.7798E−01 | 8.9368E−02 | 3.5283E−02 | 1.4744E−02 | 3.2278E−02 | 2.1367E−02 | ||
| − 7.1112E+03 | 6.9924E+02 | − 7.3357E+03 | 7.0508E+02 | − 2.9862E+03 | 3.5442E+02 | − | 7.5759E+02 | − 3.7147E+03 | 2.0745E+02 | − 7.6155E+03 | 8.7803E+02 | − 7.5698E+03 | 8.1819E+02 | − 2.7765E+03 | 3.4388E+02 | |
| 5.6806E−01 | 1.0498E+02 | 3.9353E+01 | 6.2949E+01 | 1.2413E+01 | 1.6249E+02 | 3.1801E+01 | 3.8650E+01 | 3.0163E+01 | 5.3927E+01 | 1.9322E+01 | 1.3209E+02 | 2.3029E+01 | 3.0467E+01 | 1.2955E+01 | ||
| 3.7227E−02 | 5.6079E+00 | 1.4100E+00 | 4.6567E+00 | 9.7259E−01 | 1.3410E+01 | 8.2129E+00 | 1.6576E+01 | 7.2415E+00 | 2.6304E+00 | 8.3827E−01 | 2.3565E+00 | 3.3404E+00 | 2.9176E+00 | 9.5108E−01 | ||
| 3.7925E−04 | 1.1091E+00 | 9.8949E−02 | 1.8703E+02 | 1.9145E+01 | 1.8909E+01 | 3.6619E+01 | 8.8654E−01 | 3.1146E−01 | 1.8252E−02 | 1.4655E−02 | 8.7141E−01 | 8.5692E−02 | 5.5753E−01 | 2.8875E−01 | ||
| 1.7421E−01 | 9.4889E+00 | 4.9347E+00 | 2.5243E+00 | 9.2169E−01 | 4.7287E+01 | 2.1718E+02 | 1.0826E+05 | 3.4685E+05 | 8.0007E+00 | 4.2546E+00 | 2.2880E+00 | 1.3491E+00 | 2.0946E+00 | 1.8474E+00 | ||
| 1.5727E+00 | 5.0315E−01 | 3.7212E+01 | 1.8566E+01 | 2.3815E+00 | 2.3544E+00 | 9.0138E+01 | 2.1255E+02 | 7.3125E+04 | 1.9072E+05 | 1.6785E+01 | 1.4144E+01 | 7.2391E−02 | 1.8396E+00 | 4.2620E+00 | ||
| 9.9816E−01 | 6.1346E−04 | 5.2481E−16 | 6.8263E+00 | 3.5355E+00 | 2.2837E+00 | 1.7232E+00 | 1.9204E+00 | 1.9052E+00 | 1.2626E+00 | 6.8541E−01 | 9.9800E−01 | 2.9891E−11 | 1.2295E+00 | 6.2117E−01 | ||
| 1.9673E−03 | 4.2459E−03 | 1.5969E−02 | 2.4649E−02 | 2.3951E−04 | 1.2850E−03 | 5.3964E−04 | 1.0897E−03 | 4.0441E−04 | 5.4929E−03 | 8.3801E−03 | 2.1203E−03 | 4.9657E−03 | 3.2414E−03 | 5.7635E−03 | ||
| − 1.0313E+00 | 5.1361E−04 | − 1.0316E+00 | 4.5530E−13 | − 1.0316E+00 | 6.5216E−05 | − | 0.0000E+00 | − 1.0316E+00 | 3.3087E−05 | − 1.0316E+00 | 2.5447E−14 | − 1.0316E+00 | 3.1609E−07 | − 1.0316E+00 | 5.0989E−06 | |
| 3.9851E−01 | 9.9557E−04 | 3.9789E−01 | 2.1858E−12 | 3.9814E−01 | 4.8925E−04 | 0.0000E+00 | 4.0187E−01 | 9.1717E−03 | 3.9789E−01 | 7.7808E−14 | 3.9789E−01 | 1.0016E−06 | 3.9789E−01 | 2.2095E−07 | ||
| 3.0152E+00 | 1.2467E−02 | 5.7000E+00 | 1.4789E+01 | 3.0075E+00 | 7.3803E−03 | 2.9995E−15 | 3.0001E+00 | 7.5162E−05 | 3.0000E+00 | 3.0698E−13 | 3.0000E+00 | 3.0522E−06 | 3.0000E+00 | 6.3603E−05 | ||
| − 3.8583E+00 | 4.3561E−03 | − 3.7901E+00 | 1.6365E−01 | − 3.8614E+00 | 9.7738E−04 | − | 2.7101E−15 | − 3.8533E+00 | 3.0233E−03 | − 3.8628E+00 | 4.2796E−10 | − 3.8628E+00 | 1.6161E−06 | − 3.8627E+00 | 1.0680E−04 | |
| − 3.2475E+00 | 6.9085E−02 | − 3.2759E+00 | 6.1787E−02 | − 3.0970E+00 | 3.1959E−01 | − 3.2234E+00 | 5.8608E−02 | − 2.9672E+00 | 2.6799E−01 | − 3.2126E+00 | 5.8889E−02 | − | 5.6233E−02 | − 3.2504E+00 | 9.3598E−02 | |
| − | 1.8094E+00 | − 4.9683E+00 | 3.0739E+00 | − 5.1417E+00 | 2.9174E+00 | − 6.2239E+00 | 3.3915E+00 | − 2.5289E+00 | 1.7852E+00 | − 7.8105E+00 | 3.2181E+00 | − 7.2965E+00 | 3.2182E+00 | − 7.1090E+00 | 2.7674E+00 | |
| − | 1.4775E+00 | − 5.3995E+00 | 3.4978E+00 | − 6.0982E+00 | 3.5458E+00 | − 7.5677E+00 | 3.5774E+00 | − 3.0696E+00 | 1.7428E+00 | − 8.1241E+00 | 3.3366E+00 | − 8.3030E+00 | 2.8607E+00 | − 6.7733E+00 | 2.9161E+00 | |
| − | 1.9572E+00 | − 6.2373E+00 | 3.8686E+00 | − 6.1745E+00 | 3.7598E+00 | − 7.9274E+00 | 3.5389E+00 | − 3.7453E+00 | 1.5528E+00 | − 8.1935E+00 | 3.4369E+00 | − 8.7642E+00 | 3.0618E+00 | − 7.6592E+00 | 3.4776E+00 | |
The bold indicates the optimal value for each benchmark function.
Figure 2The convergence curves of the functions
Figure 3The flowchart of IGOA-BPNN.
Figure 4The trends of the 7459 days’ closing prices of Shanghai Stock Index.
The predicted errors of the testing samples on Shanghai Stock Index.
| IGOA-BPNN | GOA-BPNN | PSO-BPNN | MFO-BPNN | SCA-BPNN | SSA-BPNN | MVO-BPNN | DA-BPNN | BPNN | |
|---|---|---|---|---|---|---|---|---|---|
| 875.57 | 858.88 | 854.16 | 850.04 | 850.04 | 880.46 | 895.94 | 1255.85 | ||
| 22.56 | 21.93 | 22.39 | 23.35 | 22.29 | 22.47 | 22.75 | 28.54 | ||
| RMSE | 3.42 | 3.38 | 3.37 | 3.53 | 3.37 | 3.43 | 3.46 | 4.09 | |
| 0.65 | 0.63 | 0.64 | 0.67 | 0.64 | 0.65 | 0.66 | 0.82 |
The bold indicates the minimum error.
Figure 5Comparison among the actual values and the predicted values of four models.
The relation of AQI and quality grade.
| Range of AQI | 0–50 | 51–100 | 101–150 | 151–200 | 201–300 | > 300 |
|---|---|---|---|---|---|---|
| Quality grade | Excellent | Good | Light pollution | Moderate pollution | Severe pollution | Serious pollution |
Figure 6The number of days and proportion distribution of six grades.
Figure 7Trends of AQI in these 1264 days.
Prediction errors of AQI test samples in Taiyuan, Shanxi.
| IGOA-BPNN | GOA-BPNN | PSO-BPNN | MFO-BPNN | SCA-BPNN | SSA-BPNN | MVO-BPNN | DA-BPNN | BPNN | |
|---|---|---|---|---|---|---|---|---|---|
| 1392.94 | 1399.39 | 1376.57 | 1352.42 | 1406.43 | 1451.88 | 1373.48 | 1433.37 | ||
| 33.17 | 33.13 | 32.91 | 32.75 | 33.14 | 33.84 | 32.81 | 33.61 | ||
| RMSE | 7.96 | 7.98 | 7.91 | 7.84 | 8.00 | 8.12 | 7.90 | 8.07 | |
| 32.58 | 32.46 | 32.10 | 32.14 | 32.44 | 32.94 | 32.17 | 32.71 |
The bold indicates the minimum error.
Figure 8Comparison among the actual values and the predicted values of four models.