径向基概率神经网络的实例(实现预测,分类)

<span style="font-size:18px;">[filename, pathname] = uigetfile('ST30.xls');
file=[pathname filename];
x=xlsread(file);
[filename, pathname] = uigetfile('NST30.xls');
file=[pathname filename];
y=xlsread(file);
p=[x;y]; 
p=p';   
T=[ones(30,1);zeros(30,1)];   
T=T';  
[filename, pathname] = uigetfile('ST08.xls');
file=[pathname filename];
x1=xlsread(file);
[filename, pathname] = uigetfile('NST08.xls');
file=[pathname filename];
y1=xlsread(file);
ptest=[x1;y1]; 
ptest=ptest';   




T2=T+1;
T2 = ind2vec(T2);   %标签
spread = 1;
net = newpnn(p,T2,spread);%形成神经网络



A = sim(net,p);                         %进行预测
Ac = vec2ind(A);
Atest = sim(net,ptest);                   
Actest = vec2ind(Atest)
plot(Actest,'r*');


</span>

你可能感兴趣的:(径向基概率神经网络的实例(实现预测,分类))