How can I improve my neural network output?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Alexandru Vasile
il 8 Mag 2015
Commentato: Alexandru Vasile
il 8 Mag 2015
Hello,
I have a prediction problem with 6x365 inputs( 6 represent, for example, the temperature for last six hours since now of every day from my database registrations) and 1x365 targets(I want to predict the next hour temperature). I don't how to choose the number of hidden layers, the number of nodes, the training algorithm, the transfer function.
That's my code now and the output is not very desirable:
net1 = newff(minmax(Input_temp),[20 1],{'tansig' 'purelin'},'traincgb','learngd');
net1.trainParam.epochs = 5000;
[net1,pr] = train(net1,Input_temp,Target_temp);
Output_temp = net1(Sample_temp)
Thank you for your time, Have a good day!
0 Commenti
Risposta accettata
Greg Heath
il 8 Mag 2015
"Not very desirable" is not very helpful. Need a numerical measure. For example
NMSE = mse(target-output)/var(target,1) % Normalized mean-square-error
NEWFF with the (minmax ... syntax has been obsolete for 10 yrs or so.
NEWFF with the (input,target,... syntax has been obsolete for 5 yrs or so.
What version of the NNToolbox are you using? Do you have FITNET?
[I N ] = size(input) % [ 6 365 ]
[O N ] = size(target) % [ 1 365 ]
Ntrn = N-2*round(0.15*N) % 255 (default 70% training examples)
Ntrneq = Ntrn*O % 255 training equations
% Nw = (I+1)*H + (H+1)*O % Number of unknown weights
% Ntrneq > Nw <==> H <= Hub % "u"pper "b"ound
Hub = -1+ceil((Ntrneq-O)/(I+O+1)) % 31
Try 10 or more multiple designs with H as small as possible (H << Hub is highly desirable but not necessary). For each value of H create 10 designs with different random initial weights and data divisions.
For many, many examples search the NEWSGROUP and ANSWERS using
greg Hmin:dH:Hmax Ntrials
Hope this helps.
Thank you for formally accepting my answer
Greg
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Sequence and Numeric Feature Data Workflows in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!