MAT之NSL:CPK_NN神经网络实现预测哪个样本与哪个样本处在同一层,从而科学规避我国煤矿突水灾难
MAT之NSL:CPK_NN神经网络实现预测哪个样本与哪个样本处在同一层,从而科学规避我国煤矿突水灾难
输出结果
代码设计
load water_data.mat
attributes = mapminmax(attributes);
P_train = attributes(:,1:35);
T_train = classes(:,1:35);
P_test = attributes(:,36:end);
T_test = classes(:,36:end);
net = newc(minmax(P_train),4,0.01,0.01);
w=net.iw{1,1};
b=net.b{1}
net.trainParam.epochs = 500;
net = train(net,P_train);
t_sim_compet_1 = sim(net,P_train);
T_sim_compet_1 = vec2ind(t_sim_compet_1);
t_sim_compet_2 = sim(net,P_test);
T_sim_compet_2 = vec2ind(t_sim_compet_2);
result_compet_1 = [T_train' T_sim_compet_1']
result_compet_2 = [T_test' T_sim_compet_2']
相关文章
MAT之NSL:CPK_NN和SOFM两种神经网络实现预测哪个样本与哪个样本处在同一层,从而判断矿井突水水源情况
赞 (0)