Zheng Shixing
School of Economics, Nanjing University of Posts and Telecommunications, Nanjing, Jiangsu, China.
PeerJ Comput Sci. 2025 Apr 1;11:e2805. doi: 10.7717/peerj-cs.2805. eCollection 2025.
To overcome the mechanical limitations of traditional inertia weight optimization methods, this study draws inspiration from machine learning models and proposes an inertia weight optimization strategy based on the K-nearest neighbors (KNN) principle with dynamic adjustment properties. Unlike conventional approaches that determine inertia weight solely based on the number of iterations, the proposed strategy allows inertia weight to more accurately reflect the relative distance between individuals and the target value. Consequently, it transforms the discrete "iteration-weight" mapping ( ) into a continuous "distance-weight" mapping ( ), thereby enhancing the adaptability and optimization capability of the algorithm. Furthermore, inspired by the entropy weight method, this study introduces an entropy-based weight allocation mechanism in the crossover and mutation process to improve the efficiency of high-quality information inheritance. To validate its effectiveness, the proposed strategy is incorporated into the Seahorse Optimization Algorithm (SHO) and systematically evaluated using 31 benchmark functions from CEC2005 and CEC2021 test suites. Experimental results demonstrate that the improved SHO algorithm, integrating the logistic-KNN inertia weight optimization strategy and the entropy-based crossover-mutation mechanism, exhibits significant advantages in terms of convergence speed, solution accuracy, and algorithm stability. To further investigate the performance of the proposed improvements, this study conducts ablation experiments to analyze each modification separately. The results confirm that each individual strategy significantly enhances the overall performance of the SHO algorithm.
为克服传统惯性权重优化方法的机械局限性,本研究从机器学习模型中汲取灵感,提出一种基于具有动态调整特性的K近邻(KNN)原理的惯性权重优化策略。与仅基于迭代次数确定惯性权重的传统方法不同,所提出的策略使惯性权重能够更准确地反映个体与目标值之间的相对距离。因此,它将离散的“迭代-权重”映射( )转换为连续的“距离-权重”映射( ),从而提高了算法的适应性和优化能力。此外,受熵权法启发,本研究在交叉和变异过程中引入基于熵的权重分配机制,以提高高质量信息继承的效率。为验证其有效性,将所提出的策略纳入海马优化算法(SHO),并使用CEC2005和CEC2021测试套件中的31个基准函数进行系统评估。实验结果表明,集成逻辑KNN惯性权重优化策略和基于熵的交叉变异机制的改进SHO算法在收敛速度、解的精度和算法稳定性方面具有显著优势。为进一步研究所提出改进的性能,本研究进行消融实验以分别分析每种改进。结果证实,每个单独的策略都显著提高了SHO算法的整体性能。