Kernel Parameter Optimization Algorithm for Chaotic Strategy and Nonlinear Convergence Factor
-
摘要: 为有效地解决SVM核参数寻优问题,提出了一种基于Fuch混沌策略协同非线性收敛因子的灰狼优化算法(FGWO)。在算法的3个阶段分别引入Fuch混沌反向学习策略、动态非线性控制参数、双权重因子策略和胜劣汰选择策略,为平衡全局探索和局部开发性能提供了新机制,增强了算法的收敛速度和收敛精度;以FGWO为新策略,构建一种FGWO-SVM分类模型,实现铝铸件表面缺陷识别。为验证算法的性能,引入10个标准测试函数,采用本文FGWO与其他算法相比较。结果表明,FGWO可以有效地解决函数优化问题;将FGWO-SVM模型应用于缺陷识别问题上,该模型对缺陷类型的平均识别率为96.6%,优于其他分类器。Abstract: In order to effectively solve the optimization problem of SVM kernel parameters, a gray wolf optimization algorithm (FGWO) based on Fuch chaos strategy and nonlinear convergence factor is proposed in this paper. This method introduces Fuch chaos reverse learning strategy, dynamic nonlinear control parameters, dual weight factor strategy and survival of the fittest selection strategy, respectively in the three stages of the algorithm. The purpose is to provide a new mechanism for balancing the performance of global exploration and local development, and to enhance the convergence speed and accuracy of the algorithm. Secondly, using FGWO as a new strategy, FGWO-SVM classification model is constructed to realize the identification of surface defects of aluminum castings. In order to verify the performance of the algorithm, on the basis of 10 standard test functions, the FGWO algorithmof this paper is compared with other algorithms. The results show that FGWO can effectively solve the function optimization problem, andwhenthe FGWO-SVM model is applied to the defect recognition problem,its average recognition rate of the defect type is 96.6%, which is better than other classifiers.
-
Key words:
- GWO algorithm /
- Fuch mapping /
- convergence factor /
- SVM /
- defect classification
-
表 1 标准的测试函数
Table 1. Test functions
表达式f(x) 范围 $ {f_{\min }} $ Dim 收敛精度 $ {f_1}(x) = \displaystyle\sum\limits_{i = 1}^d {x_i^2} $ [−100,100] 0 30
100
500$ 1 \times {10^{ - 8}} $ $ {f_2}(x) = \displaystyle\sum\limits_{i = 1}^d {|{x_i}|} + \prod\limits_{i = 1}^d {|{x_i}|} $ [−10,10] 0 30
100
500$ 1 \times {10^{ - 8}} $ $ {f_3}(x) = {\displaystyle\sum\limits_{i = 1}^d {\left(\displaystyle\sum\limits_{j = 1}^i {{x_j}} \right)} ^2} $ [−100,100] 0 30
100
500
$ 1 \times {10^{ - 8}} $$ {f_4}(x) = \max \left\{ {|{x_i}|,1 \leqslant {x_i} \leqslant d} \right\} $ [−100,100] 0 30
100
500$ 1 \times {10^{ - 8}} $ $ {f_5}(x) = \displaystyle\sum\limits_{i = 1}^d {[100{{({x_{(i + 1)}} - x_i^2)}^2} + {{({x_i} - 1)}^2}]} $ [−5,10] 0 30
100
500$1 \times {10^{ + 0} }$ $ {f_6}(x) = {\displaystyle\sum\limits_{i = 1}^n {\left( {|{x_i} + 0.5|} \right)} ^2} $ [−100,100] 0 30
100
500
$ 1 \times {10^{ - 8}} $$ {f_7}(x) = \displaystyle\sum\limits_{i = 1}^d {ix_i^4 + {\rm{rand}}(0,1)} $ [−1.28,1.28] 0 30
100
500
$ 1 \times {10^{ - 4}} $${f_8}(x) = \displaystyle\sum\limits_{i = 1}^d {[x_i^2 - 10\cos (2{\text{π}} {x_i}) + 10]}$ [−5.12,5.12] 0 30
100
500
$ 1 \times {10^{ - 8}} $$\begin{gathered} {f_9}(x) = - 20\exp \left( - 0.2\sqrt {\dfrac{1}{d} }{\displaystyle\sum\limits_{i = 1}^d {x_i^2} } \right) \\ - \exp \left[\dfrac{1}{d}\displaystyle\sum\limits_{i = 1}^d {\cos (2{\text{π}} {x_i})} \right] + 20 + e \\ \end{gathered}$ [−32,32] 0 30
100
500
$ 1 \times {10^{ - 8}} $$ {f_{10}}(x) = \dfrac{1}{{4\;000}}\displaystyle\sum\limits_{i = 1}^d {x_i^2} - \prod\limits_{i = 1}^d {\cos \left(\dfrac{{{x_i}}}{{\sqrt i }}\right)} + 1 $ [−600,600] 0 30
100
500$ 1 \times {10^{ - 8}} $ 表 2 FGWO与传统寻优算法比较结果
Table 2. Comparison results between FGWO and traditional optimization algorithms
f(x) Dim FGWO GWO PSO Mean Std SR/% Mean Std SR/% Mean Std SR/% f(1) 30 0 0 100 9.97 × 10−29 1.24 × 10−29 100 4.08 × 10−5 6.45 × 10−5 0 100 0 0 100 1.62 × 10−12 3.54 × 10−12 100 1.76 × 101 4.66 × 100 0 500 0 0 100 9.70 × 10−3 2.79 × 10−3 0 3.03 × 104 5.73 × 104 0 f(2) 30 0 0 100 3.61 × 10−17 4.56 × 10−17 100 6.73 × 10−2 5.44 × 10−2 0 100 0 0 100 4.53 × 10−8 5.36 × 10−9 0 3.81 × 101 3.65 × 101 0 500 0 0 100 1.10 × 10−2 3.74 × 10−2 0 1.41 × 103 2.45 × 103 0 f(3) 30 0 0 100 1.06 × 10−7 5.27 × 10−7 0 8.29 × 101 2.67 × 101 0 100 0 0 100 7.97 × 102 6.95 × 102 0 1.35 × 104 6.78 × 103 0 500 0 0 100 3.73 × 105 1.34 × 105 0 4.86 × 105 7.38 × 105 0 f(4) 30 0 0 100 4.55 × 10−7 1.53 × 10−7 0 1.10 × 100 8.56 × 10−1 0 100 0 0 100 1.39 × 100 1.17 × 100 0 1.19 × 101 5.34 × 100 0 500 0 0 100 6.44 × 101 4.59 × 100 0 2.84 × 101 4.76 × 101 0 f(5) 30 2.82 × 101 6.38 × 10−1 0 2.79 × 101 1.02 × 100 0 7.46 × 101 6.34 × 101 0 100 9.87 × 101 6.63 × 10−3 0 9.71 × 101 7.01 × 10−1 0 1.10 × 104 1.21 × 103 0 500 4.98 × 102 3.94 × 10−2 0 4.97 × 102 1.16 × 10−1 0 6.29 × 106 6.34 × 106 0 f(6) 30 2.24 × 100 4.84 × 10−1 0 7.28 × 10−1 3.21 × 100 0 1.24 × 10−6 6.13 × 10−6 0 100 1.74 × 101 1.08 × 100 0 9.34 × 100 2.74 × 101 0 1.81 × 101 3.21 × 101 0 500 1.14 × 102 1.92 × 100 0 9.26 × 101 4.37 × 100 0 6.38 × 103 7.54 × 103 0 f(7) 30 1.79 × 10−5 1.89 × 10−5 100 6.84 × 10−2 5.43 × 10−2 0 1.63 × 10−1 8.44 × 100 0 100 8.92 × 10−5 3.64 × 10−5 100 7.30 × 10−3 6.28 × 10−3 0 1.64 × 103 1.26 × 103 0 500 4.28 × 10−6 3.10 × 10−6 100 5.26 × 10−2 1.37 × 10−2 0 5.61 × 104 3.32 × 103 0 f(8) 30 0 0 100 6.23 × 10−13 3.25 × 10−13 100 5.78 × 101 6.09 × 101 0 100 0 0 100 5.68 × 100 2.56 × 100 0 6.75 × 102 1.78 × 102 0 500 0 0 100 1.09 × 102 5.78 × 102 0 5.95 × 103 8.36 × 102 0 f(9) 30 8.81 × 10−16 0 100 9.53 × 10−14 3.77 × 10−15 100 6.77 × 10−1 1.78 × 10−1 0 100 8.88 × 10−16 0 100 9.80 × 10−8 2.67 × 10−8 0 3.77 × 100 6.64 × 100 0 500 8.88 × 10−16 0 100 1.08 × 10−7 7.86 × 10−7 0 3.71 × 100 8.56 × 100 0 f(10) 30 0 0 100 2.34 × 10−3 4.34 × 10−4 0 7.20 × 10−3 5.67 × 10−4 0 100 0 0 100 1.98 × 10−3 7.83 × 10−3 0 6.07 × 103 1.03 × 103 0 500 0 0 100 2.25 × 10−4 4.79 × 10−4 0 9.55 × 101 6.87 × 101 0 续表 f(x) Dim SSA SCA Mean Std SR/% Mean Std SR/% f(1) 30 2.45 × 10−7 6.84 × 10−8 0 3.05 × 100 2.16 × 101 0 100 1.76 × 103 3.85 × 103 0 1.49 × 104 4.37 × 104 0 500 7.66 × 104 1.74 × 104 0 9.77 × 105 4.88 × 105 0 f(2) 30 1.74 × 100 5.33 × 100 0 1.58 × 10−2 1.20 × 10−3 0 100 4.77 × 101 6.56 × 101 0 9.86 × 100 4.56 × 100 0 500 5.33 × 102 7.55 × 102 0 1.21 × 102 5.19 × 102 0 f(3) 30 1.68 × 103 4.37 × 103 0 8.26 × 103 2.45 × 102 0 100 6.63 × 104 3.32 × 104 0 2.49 × 105 7.45 × 105 0 500 1.75 × 106 7.56 × 106 0 7.27 × 106 5.34 × 106 0 f(4) 30 1.27 × 101 6,79 × 100 0 2.50 × 101 5.45 × 100 0 100 2.99 × 101 3.47 × 101 0 8.96 × 101 1.86 × 101 0 500 4.18 × 101 2.87 × 101 0 9.91 × 101 4.12 × 101 0 f(5) 30 1.12 × 102 4.76 × 102 0 1.09 × 102 5.76 × 102 0 100 1.40 × 104 1.67 × 103 0 2.23 × 105 5.44 × 104 0 500 1.82 × 106 7.55 × 106 0 8.56 × 106 3.25 × 106 0 f(6) 30 1.90 × 10−7 7.88 × 10−7 0 1.21 × 101 7.02 × 100 0 100 1.31 × 103 2.18 × 102 0 1.69 × 104 1.78 × 104 0 500 1.03 × 105 1.32 × 100 0 1.24 × 103 5.30 × 10−1 0 f(7) 30 1.25 × 10−1 3.95 × 10−1 0 1.55 × 10−1 7.67 × 10−1 0 100 2.58 × 100 3.94 × 100 0 7.16 × 101 1.17 × 100 0 500 2.77 × 102 8.46 × 102 0 1.86 × 104 2.18 × 104 0 f(8) 30 5.24 × 101 3.28 × 101 0 5.62 × 101 1.08 × 101 0 100 2.26 × 102 5.39 × 102 0 2.49 × 102 5.54 × 101 0 500 3.03 × 103 2.42 × 103 0 5.82 × 102 8.37 × 102 0 f(9) 30 2.63 × 100 1.03 × 100 0 1.58 × 101 7.40 × 100 0 100 1.63 × 101 3.19 × 100 0 8.82 × 102 2.26 × 102 0 500 8.07 × 100 7.02 × 100 0 2.06 × 101 3.29 × 101 0 f(10) 30 5.66 × 10−3 6.12 × 10−2 0 5.83 × 100 1.63 × 100 0 100 1.63 × 101 3.11 × 101 0 8.82 × 101 7.62 × 101 0 500 9.15 × 102 1.30 × 102 0 8.92 × 102 8.91 × 101 0 表 3 FGWO与改进GWO的比较结果(Dim=30)
Table 3. Comparison results between FGWO and improved GWO (Dim=30)
$ {f_{(x)}} $ 评价指标 FGWO MGWO CGWO GWOepd f1 Mean 0 6.44 × 10−205 - 1.10 × 10−92 Std 0 0 5.90 × 10−92 Rank 1 2 3 f2 Mean 0 3.34 × 10−119 1.16 × 10−21 5.46 × 10−61 Std 0 4.95 × 10−119 1.98 × 10−22 8.09 × 10−61 Rank 1 2 4 3 f3 Mean 0 2.74 × 10−52 3.17 × 10−42 2.30 × 10−8 Std 0 1.19 × 10−51 1.04 × 10−41 1.22 × 10−7 Rank 1 2 3 4 f4 Mean 0 1.20 × 10−51 1.02 × 10−22 - Std 0 4.25 × 10−51 1.93 × 10−23 Rank 1 2 3 f5 Mean 2.82 × 101 2.69 × 101 7.31 × 10−7 4.72 × 101 Std 6.38 × 10−1 8.52 × 101 6.25 × 10−6 7.78 × 101 Rank 3 2 1 4 f6 Mean 2.24 × 100 7.86 × 101 - - Std 4.84 × 10−1 2.44 × 101 Rank 1 2 f7 Mean 1.79 × 10−5 2.60 × 10−4 1.32 × 10−6 - Std 1.89 × 10−5 1.76 × 10−4 2.05 × 10−5 Rank 2 3 1 f8 Mean 0 0 0 6.83 × 10−2 Std 0 0 0 3.74 × 10−1 Rank 1 1 1 2 f9 Mean 8.81 × 10−16 7.82 × 10−15 - 1.23 × 10−14 Std 0 7.94 × 10−16 2.27 × 10−15 Rank 1 2 3 f10 Mean 0 0 0 3.71 × 10−4 Std 0 0 0 2.03 × 10−3 Rank 1 1 1 2 表 4 FGWO不同参数取值比较结果(Dim=30)
Table 4. Comparison results for FGWO with different parameter values (Dim=30)
$ {f_{(x)}} $ 评价指标 ${ {{A} }_{\min } }{\text{ = 0} }{\text{.5} },\;{ {{A} }_{\max } }{\text{ = 1} }$ ${ {{A} }_{\min } }{\text{ = 0} }{\text{.5} },\;{ {{A} }_{\max } }{\text{ = 2} }$ ${ {{A} }_{\min } }{\text{ = 1} }{\text{.5} },\;{ {{A} }_{\max } }{\text{ = 3} }$ ${ {{A} }_{\min } }{\text{ = 1} }{\text{.5} },\;{ {{A} }_{\max } }{\text{ = 4} }$ f1 Mean 0 0 0 0 Std 0 0 0 0 f2 Mean 0 0 0 0 Std 0 0 0 0 f3 Mean 0 0 0 0 Std 0 0 0 0 f4 Mean 0 0 0 0 Std 0 0 0 0 f5 Mean 2.82 × 101 2.88 × 101 2.88 × 101 2.88 × 101 Std 6.38 × 10−1 3.60 × 10−2 4.19 × 10−2 2.18 × 10−2 f6 Mean 2.24 × 100 2.00 × 100 1.76 × 100 1.33 × 100 Std 4.84 × 10−1 5.88 × 10−1 2.23 × 10−1 6.67 × 10−2 f7 Mean 1.79 × 10−5 6.95 × 10−5 1.12 × 10−4 1.65 × 10−4 Std 1.89 × 10−5 4.26 × 10−5 3.34 × 10−5 5.87 × 10−5 f8 Mean 0 0 0 0 Std 0 0 0 0 f9 Mean 8.81 × 10−16 8.81 × 10−16 8.81 × 10−16 8.81 × 10−16 Std 0 0 0 0 f10 Mean 0 0 0 0 Std 0 0 0 0 表 5 缺陷分类结果对比
Table 5. Comparison results fordefect classification
算法模型 R/% FGWO-SVM GWO-SVM PSO-SVM GA-SVM “一对多”分类器 最高识别率 116 116 106 108 最低识别率 115 108 106 106 平均识别率 115.7 113.7 106 106.8 标准差 0.45 3.74 0 0.74 Rank 1 2 4 3 表 6 SVM与BP神经网络分类对比结果
Table 6. Comparison results between SVM and BP neural network classification
分类器 缺陷类型 划伤 黑斑 孔洞类 识别率/% FGWO-SVM分类器模型 划伤 40 0 0 100 黑斑 3 37 0 92.50 孔洞类 0 1 39 97.50 BP神经网络 划伤 38 1 1 95 黑斑 4 36 0 90 孔洞类 1 4 35 88 FGWO-SVM平均识别 正确识别样本数:116 平均识别率:96.6% BP神经网络平均识别 正确识别样本数:109 平均识别率:90% -
[1] 孙晓龙, 张志鹏, 计效园, 等. 法向算子和D2算子相结合的铸件三维模型分类算法[J]. 中国机械工程, 2020, 31(22): 2655-2662. doi: 10.3969/j.issn.1004-132X.2020.22.002SUN X L, ZHANG Z P, JI X Y, et al. Classification algorithm of casting 3D model based on normal operator and D2 operator[J]. China Mechanical Engineering, 2020, 31(22): 2655-2662. (in Chinese) doi: 10.3969/j.issn.1004-132X.2020.22.002 [2] 丁嘉鑫, 王振亚, 姚立纲, 等. 广义复合多尺度加权排列熵与参数优化支持向量机的滚动轴承故障诊断[J]. 中国机械工程, 2021, 32(2): 147-155. doi: 10.3969/j.issn.1004-132X.2021.02.004DING J X, WANG Z Y, YAO L G, et al. Rolling bearing fault diagnosis based on GCMWPE and parameter optimization SVM[J]. China Mechanical Engineering, 2021, 32(2): 147-155. (in Chinese) doi: 10.3969/j.issn.1004-132X.2021.02.004 [3] MIRJALILI S, MIRJALILI S M, LEWIS A. Grey wolf optimizer[J]. Advances in Engineering Software, 2014, 69: 46-61. doi: 10.1016/j.advengsoft.2013.12.007 [4] 张新明, 王霞, 康强. 改进的灰狼优化算法及其高维函数和FCM优化[J]. 控制与决策, 2019, 34(10): 2073-2084. doi: 10.13195/j.kzyjc.2018.0146ZHANG X M, WANG X, KANG Q. Improved grey wolf optimizer and its application to high-dimensional function and FCM optimization[J]. Control and Decision, 2019, 34(10): 2073-2084. (in Chinese) doi: 10.13195/j.kzyjc.2018.0146 [5] SAREMI S, MIRJALILI S Z, MIRJALILI S M. Evolutionary population dynamics and grey wolf optimizer[J]. Neural Computing and Applications, 2015, 26(5): 1257-1263. doi: 10.1007/s00521-014-1806-7 [6] LONG W, JIAO J J, LIANG X M, et al. An exploration-enhanced grey wolf optimizer to solve high-dimensional numerical optimization[J]. Engineering Applications of Artificial Intelligence, 2018, 68: 63-80. doi: 10.1016/j.engappai.2017.10.024 [7] 龙文, 伍铁斌. 协调探索和开发能力的改进灰狼优化算法[J]. 控制与决策, 2017, 32(10): 1749-1757.LONG W, WU T B. Improved grey wolf optimization algorithm coordinating the ability of exploration and exploitation[J]. Control and Decision, 2017, 32(10): 1749-1757. (in Chinese) [8] ZHU A J, XU C P, LI Z, et al. Hybridizing grey wolf optimization with differential evolution for global optimization and test scheduling for 3D stacked SoC[J]. Journal of Systems Engineering and Electronics, 2015, 26(2): 317-328. doi: 10.1109/JSEE.2015.00037 [9] 傅文渊, 凌朝东. 自适应折叠混沌优化方法[J]. 西安交通大学学报, 2013, 47(2): 33-38. doi: 10.7652/xjtuxb201302006FU W Y, LING C D. An adaptive iterative chaos optimization method[J]. Journal of Xi'an Jiaotong University, 2013, 47(2): 33-38. (in Chinese) doi: 10.7652/xjtuxb201302006 [10] MITTAL N, SINGH U, SOHI B S. Modified grey wolf optimizer for global engineering optimization[J]. Applied Computational Intelligence and Soft Computing, 2016, 2016: 7950348. [11] HEIDARI A A, PAHLAVANI P. An efficient modified grey wolf optimizer with Lévy flight for optimization tasks[J]. Applied Soft Computing, 2017, 60: 115-134. doi: 10.1016/j.asoc.2017.06.044 [12] 刘威, 付杰, 周定宁, 等. 基于改进郊狼优化算法的浅层神经进化方法研究[J]. 计算机学报, 2021, 44(6): 1200-1213. doi: 10.11897/SP.J.1016.2021.01200LIU W, FU J, ZHOU D N, et al. Research on shallow neural network evolution method based on improved coyote optimization algorithm[J]. Chinese Journal of Computers, 2021, 44(6): 1200-1213. (in Chinese) doi: 10.11897/SP.J.1016.2021.01200 [13] 张铸, 饶盛华, 张仕杰. 基于自适应正态云模型的灰狼优化算法[J]. 控制与决策, 2021, 36(10): 2562-2568. doi: 10.13195/j.kzyjc.2020.0233ZHANG Z, RAO S H, ZHANG S J. Grey wolf optimization algorithm based on adaptive normal cloud model[J]. Control and Decision, 2021, 36(10): 2562-2568. (in Chinese) doi: 10.13195/j.kzyjc.2020.0233 [14] KENNEDY J, EBERHART R. Particle swarm optimization[C]//Proceedings of ICNN'95 - International Conference on Neural Networks. Perth: IEEE, 1995: 1942-1948 [15] 陈涛, 王梦馨, 黄湘松. 基于樽海鞘群算法的无源时差定位[J]. 电子与信息学报, 2018, 40(7): 1591-1597.CHEN T, WANG M X, HUANG X S. Time difference of arrival passive location based on salp swarm algorithm[J]. Journal of Electronics & Information Technology, 2018, 40(7): 1591-1597. (in Chinese) [16] HEIDARI A A, ABBASPOUR R A, JORDEHI A R. An efficient chaotic water cycle algorithm for optimization tasks[J]. Neural Computing and Applications, 2017, 28(1): 57-85. doi: 10.1007/s00521-015-2037-2 [17] 高新智, 刘作军, 张燕, 等. 基于GWO-SVM的下肢假肢穿戴者骑行相位识别[J]. 浙江大学学报(工学版), 2021, 55(4): 648-657. doi: 10.3785/j.issn.1008-973X.2021.04.006GAO X Z, LIU Z J, ZHANG Y, et al. Bicycle riding phase recognition of lower limb amputees based on GWO-SVM[J]. Journal of Zhejiang University (Engineering Science), 2021, 55(4): 648-657. (in Chinese) doi: 10.3785/j.issn.1008-973X.2021.04.006 [18] CHEON S, LEE H, KIM C O, et al. Convolutional neural network for wafer surface defect classification and the detection of unknown Defect Class[J]. IEEE Transactions on Semiconductor Manufacturing, 2019, 32(2): 163-170. doi: 10.1109/TSM.2019.2902657 [19] ZHANG X W, DING Y Q, LV Y Y, et al. A vision inspection system for the surface defects of strongly reflected metal based on multi-class SVM[J]. Expert Systems with Applications, 2011, 38(5): 5930-5939. doi: 10.1016/j.eswa.2010.11.030