필터 지우기
필터 지우기

Finally i wrote this code for wind speed prediction with 3 parameters, why does my code has different prediction for the same dataset on each run?

조회 수: 1 (최근 30일)
load('input.mat');
X = tonndata(inputData(:,(1:3)),false,false);
T = tonndata(inputData(:,4),false,false);
N = 100; % Multi-step ahead prediction
inputSeries = X(1:end);
targetSeries = T(1:end);
inputSeriesVal = X(end-N+1:end);
targetSeriesVal = T(end-N+1:end);
delay = 1; %one hour
neuronsHiddenLayer = 10;
% Network Creation
net = narxnet(1:delay,1:delay,neuronsHiddenLayer);
[Xs,Xi,Ai,Ts] = preparets(net,inputSeries,{},targetSeries);
net = train(net,Xs,Ts,Xi,Ai);
view(net)
Y = net(Xs,Xi,Ai);
% Performance for the series-parallel implementation, only
% one-step-ahead prediction
perf = perform(net,Ts,Y);
[Xs1,Xio,Aio] = preparets(net,inputSeries(1:end-delay),{},targetSeries(1:end-delay));
[Y1,Xfo,Afo] = net(Xs1,Xio,Aio);
[netc,Xic,Aic] = closeloop(net,Xfo,Afo);
[yPred,Xfc,Afc] = netc(inputSeriesVal,Xic,Aic);
multiStepPerformance = perform(net,yPred,targetSeriesVal);
view(netc)
figure;
plot([cell2mat(targetSeries),nan(1,N);
nan(1,length(targetSeries)),cell2mat(yPred);]')
legend('Original Targets','Network Predictions')

답변 (0개)

카테고리

Help CenterFile Exchange에서 Parallel and Cloud에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by