测试的数据集有三种趋势型(trend),周期型(seasonal)还有混乱型的(noisy data)。三种类型要做训练集增加的测试(increasing testing set),测试集增加的测试(increasing testing set)和选择点测试(the optional point). 其中得出预测信任值(见照片图表)。
测试标准有4个:
1.误方差(mean squared error)小于1.
2.标准差(standard deviation)
3.标准差率(standard Deviation Ratio)即预测标准差除以实际标准差,小于1.0.
4.皮尔逊相关系数 person’s correlation coefficient -1到1.
RBF神经网络是一种三层神经网络,包括输入层、隐层、输出层。从输入空间到隐层空间的变换是非线性的,而从隐层空间到输出层空间的变换是线性的。
RBF网络是一种局部逼近网络,对于每个训练祥本,它只需要对少量的权值和阈值进行修正,因此训练速度快。RBF神将网络是一种三层神经网络,其包括输入层、隐层、输出层。从输入空间到隐层空间的变换是非线性的,而从隐层空间到输出层空间变换是线性的。RBF网络的基本思想是:用RBF作为隐单元的“基”构成隐含层空间,这样就可以将输入矢量直接映射到隐空间,而不需要通过权连接。当RBF的中心点确定以后,这种映射关系也就确定了。而隐含层空间到输出空间的映射是线性的,即网络的输出是隐单元输出的线性加权和,此处的权即为网络可调参数。
登录后复制
clc;clear;close all;warning off;load data1.mat%%%选择100个数据作为输入Data = data1(1:100);%%%选择20个训练数据t11 = 1:10;Train_data1 = Data(1:10);t12 = 1:10;spread = 1;goal = 0.01;df = 1;mn = length(t11);net = newrb(t11,Train_data1,goal,spread,mn,df); yc1 = sim(net,t12); %%%选择70个训练数据t21 = 1:60;Train_data2 = Data(1:60);t22 = 1:60;spread = 1;goal = 0.01;df = 1;mn = length(t21);net = newrb(t22,Train_data2,goal,spread,mn,df); yc2 = sim(net,t22);figure;plot(t21,Train_data2,'b-o');hold on;plot(t22,yc2,'r-*');hold off;grid on;%%%%对比计算结果mser11 = func_mse(Train_data1);mser12 = func_mse(yc1);sder1 = func_sd(yc1);sdrer1 = func_sdr(yc1,Train_data1);coeff1 = func_pcc(yc1,Train_data1);fprintf('Inputs Train data points MSE training MSE testing PCC SDR SD\n');fprintf('-----------------------------------------------------------------------------------------------\n');fprintf('100 20 ');fprintf('%2.6f ',mser11);fprintf('%2.6f ',mser12);fprintf('%2.6f ',coeff1);fprintf('%2.6f ',sdrer1);fprintf('%2.6f ',sder1);fprintf('\n');fprintf('-----------------------------------------------------------------------------------------------\n');mser21 = func_mse(Train_data2);mser22 = func_mse(yc2);sder2 = func_sd(yc2);sdrer2 = func_sdr(yc2,Train_data2);coeff2 = func_pcc(yc2,Train_data2);fprintf('100 70 ');fprintf('%2.6f ',mser21);fprintf('%2.6f ',mser22);fprintf('%2.6f ',coeff2);fprintf('%2.6f ',sdrer2);fprintf('%2.6f ',sder2);fprintf('\n');fprintf('-----------------------------------------------------------------------------------------------\n');%%%下面的程序是画图cnt = 0;for i = 10:2:60 i cnt = cnt + 1; t01 = 1:i; Train_data0 = Data(1:i); t02 = 1:i; spread = 1; goal = 0.01; df = 1; mn = length(t01); net = newrb(t02,Train_data0,goal,spread,mn,df); yc0 = sim(net,t02); %% %%对比计算结果 mser01(cnt) = func_mse(Train_data0); mser02(cnt) = func_mse(yc0); sder0(cnt) = func_sd(yc0); sdrer0(cnt) = func_sdr(yc0,Train_data0); endfigure;plot(10:2:60,mser01,'b-o');hold on;plot(10:2:60,mser02,'r-^');hold on;plot(10:2:60,sder0,'k-o');hold on;plot(10:2:60,sdrer0,'m-*');hold on;grid on;legend('MSER1','MSER2','SD','SDR');xlabel('training increasing');ylabel('error value');1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.30.31.32.33.34.35.36.37.38.39.40.41.42.43.44.45.46.47.48.49.50.51.52.53.54.55.56.57.58.59.60.61.62.63.64.65.66.67.68.69.70.71.72.73.74.75.76.77.78.79.80.81.82.83.84.85.86.87.88.89.90.91.92.93.94.95.96.97.98.99.100.101.102.103.104.105.106.107.108.109.110.111.112.113.114.115.116.117.
免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删