how to initialize a network using nlarx

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

답변 (1개)

Walter Roberson
Walter Roberson 2011년 9월 6일

0 개 추천

%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

Reu
Reu 2011년 9월 7일
Thanks.
But doing that, nnett looses all its properties.
This should work:
for i=1:maxiter
nnett=newff(zeros(0,10),rand(1,10),[2]);
%other properties
m{i}=nlarx(data,[2 2 0],neuralnet(nnett));
end
%choose the best model
but it's not very clean. There isn't something like init(nnett) or someway to let nlarx initialize the network randomly?
Thx again.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기

질문:

Reu
2011년 9월 6일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by