How can I set the normalization of the performance parameter in training a neural network?
9 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Marco Giuliani
il 13 Lug 2017
Commentato: Marco Giuliani
il 18 Set 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 Commento
Greg Heath
il 14 Lug 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
Risposta accettata
Kamuran Turksoy
il 15 Set 2017
Modificato: Kamuran Turksoy
il 15 Set 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 Commenti
Greg Heath
il 15 Set 2017
Why are you changing anything except the number of hidden nodes???
The other default values suffice 99.99% of the time
Greg
Più risposte (1)
Greg Heath
il 13 Lug 2017
Modificato: Greg Heath
il 14 Lug 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 Commenti
Vedere anche
Categorie
Scopri di più su Define Shallow Neural Network Architectures 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!