How to predict future data after training the ANN?

6 vues (au cours des 30 derniers jours)
Ali Saremi
Ali Saremi le 27 Août 2017
Commenté : adib adib le 19 Oct 2021
Hi,
My name is Ali. 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.
Kind Regards Ali
  1 commentaire
adib adib
adib adib le 19 Oct 2021
Hi Ali,
Can I have your email?
Best Regards,
Adib

Connectez-vous pour commenter.

Réponse acceptée

Greg Heath
Greg Heath le 27 Août 2017
%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
Thank you for formally accepting my answer
Greg
  1 commentaire
lior niss
lior niss le 11 Sep 2017
Hello Greg,
I saw that there were similar questions here, but I could not find a simple answer. I am looking a basic and simple answer. This is my problem : I need to predict stocks targets based on sequential features. I have samples of 595 different cases over 4638 times. For each time sample I have 179 features and a single target. The values of the features and targets are real values between -1.5 to 1.5. I tried number of algorithms, without success and now I'm trying to apply a neural network with Time series app . I train the data using Levenberg-Marquardt and after the training I save the results and I chose the option generate the script. So the question is: after I did training and got a model for my net , How do I get the prediction for another 1000 samples ( each sample is contains 179 features)? How should I use the model I have already created for the prediction problem?
Thank you

Connectez-vous pour commenter.

Plus de réponses (1)

Greg Heath
Greg Heath le 11 Sep 2017
The first thing you need to do is throw away as many redundant inputs as possible.
I'm not sure of the best way to do it. However, It really is not necessary to find the optimum combination; just a good one.
I would start with 10 simple linear input reduction models using PLSREGRESS and 10 subsets with ~ 18 inputs each.
Hope this helps.
Greg

Catégories

En savoir plus sur Sequence and Numeric Feature Data Workflows dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by