Issues with trainbr in pattternnet
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Charles Henri
el 23 de Abr. de 2013
Comentada: Greg Heath
el 23 de Feb. de 2014
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 comentarios
Respuesta aceptada
Greg Heath
el 14 de Jun. de 2013
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 comentario
Greg Heath
el 23 de Feb. de 2014
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
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!