论文部分内容阅读
BP神经网络对于非线性函数的拟合具有较好的效果,但是对于网络的初始权值和阈值一般采用随机值,这影响了神经网络的预测效果。结合遗传算法与BP神经网络,将权值和阈值作为个体,神经网络的预测输出和期望输出之间的误差绝对值之和作为个体适应度值。首先利用遗传算法得到神经网络的最优初始权值和阈值,再进行神经网络的训练,最后对训练好的网络进行预测。该方法运用于南京市降雨量预测,结果表明,经过遗传算法优化之后的神经网络GABP比BP网络具有更好的预测效果。
BP neural network has a good effect on the fitting of nonlinear functions, but the initial weights and thresholds of the network generally adopt random values, which affects the prediction effect of the neural network. Combining genetic algorithm and BP neural network, the sum of the absolute value of the error between the predicted output of the neural network and the expected output is taken as the individual fitness value. Firstly, the optimal initial weights and thresholds of neural network are obtained by using genetic algorithm, and then the neural network is trained. Finally, the trained network is predicted. The method is applied to forecast rainfall in Nanjing. The results show that the neural network GABP optimized by genetic algorithm has a better prediction effect than BP network.