How can I set the normalization of the performance parameter in training a neural network?
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Marco Giuliani
le 13 Juil 2017
Commenté : Marco Giuliani
le 18 Sep 2017
hey, I am using the neural network toolbox. I am training a feedforward network with two outputs. The two have different dimension I need to normalize the performance parameter (mean squared error) to let them have the same 'weight' during the training. I do it with this line:
net.performParam.normalization = 'normalized';
The problem is that after the train if I go to chek the value of that parameter (net.performParam) it results as 'none', meaning it did not set 'normalized', and I cannot understand if it worked. how can I solve this problem? here I report the code in question:
net=feedforwardnet;
net=configure(net,x,t);
trainFcn = 'trainlm';
hiddenLayerSize = 22;
net = feedforwardnet(hiddenLayerSize,trainFcn);
net.performParam.normalization = 'normalized';
net.performFcn = 'mse';
[net,tr] = train(net,x,t);
1 commentaire
Greg Heath
le 14 Juil 2017
1. ALWAYS BEGIN WITH DOCUMENTATION EXAMPLES
a. For classification/pattern-recognition
help patternnet
doc patternnet
b. For regression/curve-fitting
help fitnet
doc fitnet
c. Both call feedforwardnet with appropriate default
settings
2. Since these can be improved check the NEWSGROUP using
greg quickies
3.Finally, for more serious work, search BOTH NEWSGROUP and ANSWERS using
HITS
NEWSGROUP ANSWERS
a. patternet Hmin Hmax 4 35
or
b.fitnet Hmin Hmax 12 42
Réponse acceptée
Kamuran Turksoy
le 15 Sep 2017
Modifié(e) : Kamuran Turksoy
le 15 Sep 2017
net.performParam.normalization does not have an option of 'normalized'. It has three options:
'none' (default: no normalization), 'standard' or 'percent'.
In your code you would get error if you switch the below two lines:
net.performParam.normalization = 'normalized';
net.performFcn = 'mse';
to
net.performFcn = 'mse';
net.performParam.normalization = 'normalized';
Since the default option of mse is 'none', when you define mse after performParam.normalization you overwrite it to be none.
Try this
net.performFcn = 'mse';
net.performParam.normalization = 'percent' or 'standard';
Check the link below for more information:
https://www.mathworks.com/help/nnet/ref/mse.html
2 commentaires
Greg Heath
le 15 Sep 2017
Why are you changing anything except the number of hidden nodes???
The other default values suffice 99.99% of the time
Greg
Plus de réponses (1)
Greg Heath
le 13 Juil 2017
Modifié(e) : Greg Heath
le 14 Juil 2017
1. You do not have to worry about normalizaion. It is a default.
2. Accept all defaults except the number of hidden nodes.
3. Create an outer for loop over hidden nodes h = Hmin:dH:Hmax
4. Create an inner loop over Ntrials configurations for random initial weights
5. Search for some of my examples
HITS
NEWSGROUP ANSWERS
FITNET Hmin Hmax 12 41
Hope this helps
THANK YOU FOR FORMALLY ACCEPTING MY ANSWER
GREG
0 commentaires
Voir également
Catégories
En savoir plus sur Define Shallow Neural Network Architectures 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!