how to initialize a network using nlarx
Ältere Kommentare anzeigen
Hi, i'm using matlab 2010a and this is what i want to do:
======
nnett=newff(zeros(0,10),rand(1,10),[2]);
%other properties
for i=1:maxiter
m{i}=nlarx(data,[2 2 0],neuralnet(nnett));
end
%choose the best model
=====
The problem is that at each iteration the network has always the same initial weights (and obvioulsy they all give the same result). I've tried to set
=====
nnett.Network.layers{2}.initFcn='rands'
=====
but it gives this error:
=====
Error in ==> nlarx at 370 ??? Error using ==> rand
Inputs must be numeric.
=====
Any ideas?
Thanks
Antworten (1)
Walter Roberson
am 6 Sep. 2011
%other properties
for i=1:maxiter
nnett=newff(zeros(0,10),rand(1,10),[2]);
m{i}=nlarx(data,[2 2 0],neuralnet(nnett));
end
%choose the best model
1 Kommentar
Reu
am 7 Sep. 2011
Kategorien
Mehr zu Sequence and Numeric Feature Data Workflows finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!