1 算法介绍
2 部分代码
%% 差分进化算法应用于优化BP神经网络的初始权值和阈值%% 清空环境变量clear all;clc;warning offload v357;load y357;Pn_train=v;Tn_train=y;Pn_test=v;Tn_test=y;P_train=v;T_train=y;% P_train=[0 25.27 44 62.72 81.4 100.2;%290.5 268.8 247.2 224.5 206 184.4;%0 16.12 33.25 50.42 67.62 84.73;%542.5 517.8 493 465.3 435.6 410.8;%0 11.1 28.1 44.93 61.38 78.57;%826.1 800.2 769.1 740.0 706.2 669.3];% T_train=[0 1 2 3 4 5];%以上是未处理的数据% P_test=[0 25.25 43 62.75 81.6 100.7;%290.3 268.4 247.5 224.6 206 184.2;%0 16.14 33.26 50.47 67.68 84.79;%542.7 517.9 495 465.8 435.6 410.9;%0 11.4 28.6 44.94 61.36 78.59;%826.3 800.7 769.8 740.5 706.7 669.3];% T_test=[0 1 2 3 4 5];% Pn_train=[0 0.252 0.439 0.626 0.813 1 0 0.19 0.392 0.595 0.798 1 0 0.141 0.358 0.572 0.781 1;% 1 0.795 0.592 0.378 0.204 0 1 0.815 0.626 0.415 0.189 0 1 0.835 0.637 0.451 0.235 0];% %