필터 지우기
필터 지우기

How can I set the normalization of the performance parameter in training a neural network?

조회 수: 22 (최근 30일)
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
Greg Heath
Greg Heath 2017년 7월 14일
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

댓글을 달려면 로그인하십시오.

채택된 답변

Kamuran Turksoy
Kamuran Turksoy 2017년 9월 15일
편집: Kamuran Turksoy 2017년 9월 15일
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
Greg Heath
Greg Heath 2017년 9월 15일
Why are you changing anything except the number of hidden nodes???
The other default values suffice 99.99% of the time
Greg
Marco Giuliani
Marco Giuliani 2017년 9월 18일
You are totally right Kamuran, I figured it out later using the code. I was using 'normalized' instead of 'standard' because I was using a 2011 version of matlab (and at that time the options were 'normalized' or 'percent'). By the way Greg, you need to set that option in case you have more than one output with different units. In that case, the bigger (numerically) will have an higher impact in the measure of the mse.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Greg Heath
Greg Heath 2017년 7월 13일
편집: Greg Heath 2017년 7월 14일
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

Community Treasure Hunt

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

Start Hunting!

Translated by