|国家预印本平台
首页|基于萤火虫算法的特征选择方案

基于萤火虫算法的特征选择方案

Feature selection scheme based on firefly algorithm

中文摘要英文摘要

在入侵检测中,处理高维数据往往是一个重要的步骤,高维数据带来更高的计算成本,处理起来更加困难,因此设置降维方案是必不可少的。本文针对传统萤火虫算法易收敛、计算成本较高的问题,通过对萤火虫算法进行改进,提出一种基于萤火虫算法的特征选择方案。具体改进方式为:对初始化种群,定义单个萤火虫个体为0-1组成的向量,对离散的特征设置一对一的对应关系;对步长,引入动态更新步长机制,初始步长设置较高的值,在算法迭代的前期可以更好的全局搜索,一定迭代次数后,步长逐渐减少,进而快速收敛到最优解;对亮度函数以及选择方式,引入类间距离作为亮度函数,重新定义选择方式。改进后的萤火虫算法对KDDCUP99数据集进行特征选择,得到了10个最优特征,为\{3,4,5,6,8,10,13,23,24,37\},对10个特征训练后进行检测,准确率为99.48\%。

In intrusion detection, processing high-dimensional data is often an important step. High-dimensional data brings higher computing cost and more difficult to process. Therefore, it is essential to set up dimensionality reduction scheme. Aiming at the problems of easy convergence and high computational cost of the traditional firefly algorithm, this paper proposes a feature selection scheme based on the firefly algorithm by improving the firefly algorithm. The specific improvement methods are as follows: for the initial population, define a vector composed of 0-1 for a single firefly individual, and set a one-to-one correspondence for discrete features; For the step size, the dynamic update step size mechanism is introduced, and the initial step size is set to a higher value, which can better global search in the early stage of the algorithm iteration. After a certain number of iterations, the step size gradually decreases, and then quickly converges to the optimal solution; For the brightness function and selection mode, the distance between classes is introduced as the brightness function to redefine the selection mode. The improved firefly algorithm selects the features of KDDCUP99 data set and obtains 10 optimal features, which are \{3,4,5,6,8,10,13,23,24,37\}. After training the 10 features, the accuracy is 99.48\%.

孟昊天、彭海朋

计算技术、计算机技术

萤火虫算法特征选择入侵检测降维方案

Firefly algorithmFeature selectionIntrusion detectionDimensionality reduction scheme

孟昊天,彭海朋.基于萤火虫算法的特征选择方案[EB/OL].(2022-03-14)[2025-08-11].http://www.paper.edu.cn/releasepaper/content/202203-154.点此复制

评论