I have stuck with using narnet .
Show older comments
I have used the code provided by Greg in newsgroup. My sample code is here:
Input
clc,clear;
plt=0;
X=load('BOD test.txt');
L=length(X),
net=narnet(1:.1,10);
view(net),
[Xs,Xsi,Asi,Ts] = preparets( net, {}, {}, X );
ts = cell2mat(Ts);
plt = plt+1; figure(plt), hold on
plot( 1:L, ts, 'LineWidth', 2 )
rng( 'default' )
[net tr Ys Es Af Xf] = train( net, Xs, Ts, Xsi, Asi );
view( net )
NMSEs = mse( Es ) /var( ts,1 )
ys = cell2mat( Ys );
plot( 1:L, ys, 'ro', 'LineWidth', 2 )
axis( [ 0 22 0 1.3 ] )
legend( 'TARGET', 'OUTPUT' )
title( 'OPENLOOP NARNET RESULTS')
And the output is:
L =
18
NMSEs =
1.0000
And what's wrong with curve plot:

4 Comments
Greg Heath
on 26 Dec 2015
PLEASE DO NOT USE THE NEWGROUP AND ANSWERS FOR THE SAME PROBLEM!!!
Image Analyst
on 26 Dec 2015
With all due respect professor, I'm not against looking for solutions in multiple places. In the real world you need to solve a problem and you cast a wide net to get all possible leads. You might get one lead in one place and a totally different approach in a different place. My manager would never say to me "Solve this problem but only look in one place." He just wants the job done and doesn't care how I get the job done (as long as it's ethical). On the contrary they want us to look in as many places as practical for a solution, which may reveal a better solution or get a workable solution faster. Granted, you're the only neural network expert here so in this particular case he probably won't find any different approaches, but in general I don't think it's a bad idea because different people participate in different forums and that could lead to different approaches.
Yeasir Mohammad Akib
on 26 Dec 2015
Greg Heath
on 27 Dec 2015
I understand your point. However, often the descriptions of the same problem from the same poster in the two forums are different.
Consequently I have found myself dizzily ping ponging back and forth between the two.
It is very, very annoying.
Therefore, I will continue, at least for neural nets, to rant my dissatisfaction. However, I will add a neural net qualifier.
Grumpy Greg
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!