How to predict future data after training the ANN?

A
Ali_saremi · Jul 14, 2021 · 1.9K views
Question
Hi,   I have trained my network with my input data (wind Speed) and output data (Wave Height) and got good results. Also, i have my future data (Wind Speed) obtained from GSM from 2080 to 2100, so eveything is ready to perdict wave heights from 2080 to 2100. Please take a look at the screen shot attached to see what the codes are. If someone can help me how i can do the final stage, I would really apperciate it.  
Expert Answer
Profile picture of Kshitij Singh
Kshitij Singh PhD Expert
Answered Aug 14, 2026
 %Just relying on default values:
 x = annInput';
 t = annTarget';
 net = fitnet;
 [net tr y e ] = train(net,x,t);
 MSE = mse(e)
% Can obtain trn, val and tst subset indices from tr
% to obtain subsets of y and e and corresponding MSEtrn
% MSEval, MSEtst
%
% For arbitrary X
Y = net(X);

 HOWEVER ...

 DEFAULTS H=10 AND rng = RNG('DEFAULT') ARE OFTEN INNAPPROPRIATE!!!

 In general, use a search for the smallest successful H (for stability) and 
corresponding set of random initial weights.

 I use a double for loop approach over the outer loop H = Hmin:dH:Hmax and 
inner loop i = 1:Ntrials over random number states to find initial weights that will 
yield a sufficiently small value of MSE.

Zillions of examples have been posted on both NEWSGROUP and ANSWERS. Good search words are

 Greg Hmin Hmax
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!