From: Greg Heath on
On Feb 10, 4:45 am, sagar sharma <gauravgoswa...(a)gmail.com> wrote:
> hello sir,
> i m using NN first time,
> my task is to prediction throughneuralnetwork .I am using
> the followingneuralnetwork code with the help of nntoolbox
> MATLAB R2008a ............
>
> [An,ps] = mapminmax(A,0,1);
> [Bn,ts] = mapminmax(B,0,1);
> Cn = mapminmax('apply',C,ps);
>
> net = newff(minmax(An),[25 1],{'tansig' 'purelin'}, 'trainlm');
>
> net.trainParam.epochs = 100;
> net.trainParam.show = 24;
>
> net = train(net,An,Bn);
> Dn = sim(net,An);
> D = mapminmax('reverse',Dn,ts);
> En=sim(net,Cn);
> F = mapminmax('reverse',En,ts);
>
> HERE,A= 6x150 input matrix,An =normalized value
> B=1X150 output matrix, Bn =normalized value for training
> c=6x75 for testing,
> now I am getting following problems even my training results are
> very accurate (R=1),
>
> 1-my results while testing, becomes negative values

Why is that a problem?

> 2-results of training and testing changes every time ,
> it is not stable .

Initial weight assignments in newff are random.
if you want repeatable results, use the same
initial state of the random number generator.

doc rand
help rand
doc randn
help randn


> 3-what should the value of epoch

Don't specify it and the default value of 100
will be used. If that is insufficient, increase it.


> ... and hidden layers neurons...........

Search the group archives

"greg heath" pre training advice for newbies
"greg heath" Neq Nw

> plz provide me a proper guidance as soon as possible.
>
> and also sir,what should be the value of goal

MSE00/100 where MSE00 is the MSE of a linear backslash model.

> ..is it possible to prepare a network with out defining a goal.

Yes; the default value of 0 will be used.

Be cognizant of default values via

doc newff
help newff
doc trainlm
help trainlm

Hope this helps.

Greg