Thread Subject: preparets, train, bug?

Subject: preparets, train, bug?

From: grega

Date: 7 Oct, 2011 08:27:10

Message: 1 of 1

Hey!
Please see example below. The 2 networks are different, but the results are the same. Shouldn't there be a lag of 2 between Xs2 (input) and Ts2 (output) in the Case 2?

Please comment!

x = 0:.1:10; y = (x-5).^2;
x = con2seq(y);
y = x;

% Case 1
net = timedelaynet(0:4,4);
[Xs,Xi,Ai,Ts] = preparets(net,x,y);
net = train(net,Xs,Ts,Xi); view(net)
yp = net(Xs,Xi);

% Case 2
net2 = timedelaynet(2:4,4);
[Xs2,Xi2,Ai2,Ts2] = preparets(net2,x,y);
net2 = train(net2,Xs2,Ts2,Xi2); view(net2)
yp2 = net2(Xs2,Xi2);

% Comparison
figure,plot([cell2mat(yp)',cell2mat(Ts)'])
figure,plot([cell2mat(yp2)',cell2mat(Ts2)']) % Ts2 should be lagged for 2
TR = [Xs;Ts];
TR2 = [Xs2;Ts2]; % same delay and training data as in Case 1, but there is no expected lag

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
preparets grega 7 Oct, 2011 04:29:11
train grega 7 Oct, 2011 04:29:11
bug grega 7 Oct, 2011 04:29:11
rssFeed for this Thread

Contact us at files@mathworks.com