MIMO narxnet for future predictions. HOW!!
이전 댓글 표시
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
Greg Heath
2018년 5월 1일
LINE 6:
P24 IS UNDEFINED!
답변 (1개)
Moataz Sheha
2018년 4월 30일
0 개 추천
댓글 수: 1
Greg Heath
2018년 5월 1일
PLEASE MOVE YOUR COMMENT TO A COMMENT BOX. THEN DELETE IT FROM THE ANSWER BOX
THANKS
카테고리
도움말 센터 및 File Exchange에서 AI for Wireless에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!