BP神经网络在排序算法模拟中的应用研究
2020-07-29王小春
王小春



摘 要: 提出了用BP神经网络对排序算法进行模拟。首先利用BP神经网络对排序算法的实际输出结果进行预测,然后用匈牙利算法和全局贪心两种算法对网络输出结果与输入数据进行平衡匹配。实验证明两种算法均对低维数据的排序有更好的效果。针对10维数据经匈牙利算法匹配后排序正确率为75.70%,经贪心算法匹配后排序正确率为44.85%,且匈牙利算法的排序正确率均不低于贪心算法。
关键词: BP神经网络; 排序算法模拟; 匈牙利算法; 贪心算法
中图分类号: TP311文献标志码: A
Research on Simulation on Sorting Algorithm Based on BP Neural Network
WANG Xiaochun
(Computer Engineer College, Xian Aeronautical Polytechnic Institute, Xian, Shanxi 710089, China)
Abstract: An algorithm for sorting problem is proposed in this paper based on BP neural network.Firstly, a BP neural network is used to make a prediction for the output of the sorting algorithm. Then, Hungarian algorithm and global greedy algorithm are used to balance the output and input data. The experimental results show that Hungarian algorithm and global Greedy algorithm all have better effect on the sorting of data in low dimension.The correct rate of the 10 dimensional data processed by Hungary algorithm and Greedy algorithm is 75.70% and 44.85%. The conclusion can be drawn that the correct rate of the Hungarian algorithm is higher than the greedy algorithm in sorting according to a comprehensive comparison.
Key words: BP neural network; sorting algorithm simulation; Greedy algorithm
0 引言
算法模拟作为神经网络应用中很少被提及的一部分,对算法理解和优化及神经网络的应用领域方面有很大的意义。本研究提出用神经网络对排序算法进行模拟,为排序算法的实现提供了一种全新的方法,对其他算法模拟提供了参考方法。本研究将BP神经网络与其他算法相结合来实现排序算法模拟,也为神经网络的应用研究提供了一种新的思路。本研究中针对排序算法的模拟选用BP神经网络来实现,所开展的实验均是在MATLAB上编写并运行实现的。
1 关键技术研究
1.1 BP神经网络
BP算法作为一种典型的神经网络,一般用梯度下降法优化训练结果,基本BP算法通常包含以下两个部分:信息的前向传播和误差的后向传播[1]。通俗的说,输入数据构成的向量传递给网络时,这些信息通过网络逐层处理并向后传播直至输出层,传播过程中,各个神经节点的值由与之连接的节点的值和这些节點的权重决定[2]。……
