Issues with trainbr in pattternnet
조회 수: 5 (최근 30일)
이전 댓글 표시
Hi,
I have some some samples which are from 2 populations and I have to find a way to distinguish them thanks to a patternnet.
I have tried learning with gradient descent and then quasi-Newton but there was overfitting, I have tried the same with early stopping but it has stopped too early and has not learnt anything...
So, now, I want to try weight decay in order to save the "early stopping set" and so having as many samples I can in the learning set.
But, I have some troubles with trainbr... Indeed, I guess that the weight of the sum of weight has been favoured against the error because the weights of the final network are around 10^-19 !!! and all the samples are classified in the same group. By the way, I think that I have read somewhere (but I can't remember where) that trainbr does not accept a logsig transfert function but only a tansig, is it true ? I find nothing that denied or validate it. Finally, in the description of "trainbr" it is written that we have to put the 'trainlm' training function and then call "train" in order to launch trainbr (it is not what I have done, I launch trainbr and not train) but I don't understand this point too.
Thanks by advance for your answer,
best regards
댓글 수: 0
채택된 답변
Greg Heath
2013년 6월 14일
The default for patternnet is trainscg. Why did you change it?
With patternnet make sure your target matrix only contains unit vector columns with a single 1 and the rest zeros.
I always use train. I'm not sure what happens if you use trainscg directly.
Overfitting can usually be avoided by minimizing the number of hidden nodes and/or using a validation set.
If you still need help please post code including input and target matrix dimensions.
Hope this helps.
Thank you for formally accepting my answer
Greg
댓글 수: 1
Greg Heath
2014년 2월 23일
I see 2 ways to use trainbr.
MSE00 = mean(var(t'),1) % MSE of naïve constant output model
[ net tr [ = trainbr(net,x,t);
y = net(x);
NMSE = mse(t-y)/ MSE00
R2 = 1-NMSE
and
net.trainFcn = 'trainbr';
[ net tr y e ] = train(net,x,t);
NMSE = mse(e)/MSE00
R2 = 1-NMSE
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!