probabilistic neural network coding problem
Show older comments
i have create this simple code and trying to make classification between two inputs, but, after run the code the output is not overlapping the input and is not fitting the target, even the output it self i am not sure is looks like ANN output? or PNN has different output functions.
any one can give suggestion please.
regards
code is here:
clc
format short
p=[1.7572 8.3747 6.6941 4.0114 1.7572 1.9934 4.9658 8.4807 5.3349 5.5587 2.7213 1.9934 8.8202 4.9658 5.754 7.809 4.3451 4.7672
1.30E+08 5.81E+05 -6.63E+05 3.47E+06 1.30E+08 1.19E+08 2.68E+08 -2.39E+05 4.99E+05 -9.24E+04 -5.09E+06 1.19E+08 -7.06E+04 2.68E+08 -3.67E+05 -2.80E+05 -8.74E+05 -1.77E+05
-0.3045 -0.4317 -0.8981 0.1139 -0.3045 -0.0431 1.6113 -0.5305 -0.4704 -0.0686 -0.0464 -0.431 -0.4884 1.6113 -0.4654 -0.1465 -0.6266 0.6488
5.02E+07 2.09E+07 7.13E+06 2.48E+07 5.02E+07 4.92E+07 1.71E+08 7.47E+06 7.14E+06 7.85E+06 5.50E+07 4.92E+07 7.06E+06 1.71E+08 7.56E+06 2.96E+07 1.14E+06 1.17E+07
];
t=[0 1 0 1 0 0 1 0 0 0 1 0 0 1 0 1 0 0
];
plottools('on');
spread= 10;
net=newpnn(p,t,spread);
net.performFcn;
toc;
tic;
plottools('on');
hold on;
%net.trainparam.show=1;
nettrainparam.epochs=1000;
%net.trainparam.goal=0.0002;
%net.trainParam.searchFcn = 'srchbac';
nettrainparam.lr=0.5;
%net=train(net,p,t);
y=sim(net,p);
plotregression(t,y);
%plottraining (t,y);
plottools('on');
error=abs(y-t);
plot(error);
%y=sim(net,p);
grid on;
legend off;
plottools('on');
%plot(p,t,'*');
%e = t-y
% perf = mse(e);
% perf = sse(e);
End
Accepted Answer
More Answers (0)
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!