MIMO narxnet for future predictions. HOW!!
Ältere Kommentare anzeigen
Here is my problem, I have a code that is running but I'm not sure that I do understand the concept because the results don't look like what I'm expecting. Here is my code:
x = [cost(1:24,:);Tamb24(1:24,:);SOC_old24(1:3,:);P_old24(1:3,:)];
xx = cell(1,nn);
PP = cell(1,nn);
for i = 1:nn
xx{i} = x(:,i);
PP{i} = P24(1:24,i);
end
net = narxnet(1:2,1:2,5);
[Xs,Xi,Ai,Ts] = preparets(net,xx,{},PP);
net = train(net,Xs,Ts,Xi,Ai);
[Y,Xf,Af] = net(Xs,Xi,Ai);
perf = perform(net,Ts,Y);
[netc,Xic,Aic]= closeloop(net,Xf,Af);
xnew = [cost(1:24,:);Tamb24(1:24,:);SOC_old24(1:3,:);P_old24(1:3,:)];
n = 100;
xxnew = cell(1,n);
for i = 1:n
xxnew{i} = xnew(:,i);
end
y2 = netc(xxnew,Xic,Aic);
yy = cell2mat(y2);
figure(2)
plot(1:24,P24(1:24,4))
hold on
grid on
plot(1:24,yy(:,4))
legend('Measured','Model')
hold off
Sometimes I run this code and get really very good R values and the parity plot looks nice, but the plot of the predicted data vs. the actual one is really terrible! Is there something wrong with my understanding of how this should work?
1 Kommentar
Greg Heath
am 1 Mai 2018
LINE 6:
P24 IS UNDEFINED!
Antworten (1)
Moataz Sheha
am 30 Apr. 2018
0 Stimmen
1 Kommentar
Greg Heath
am 1 Mai 2018
PLEASE MOVE YOUR COMMENT TO A COMMENT BOX. THEN DELETE IT FROM THE ANSWER BOX
THANKS
Kategorien
Mehr zu AI for Wireless 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!