Pattern recognition neural network : training process performance question
이전 댓글 표시
I am just starting using neural networks, but I am troubled by something when I use patternnet function. I have a set of about 200 data, each having 5 parameters (input is 5x200). I want the NN to classify those data into 7 classes, so my target data is a 7x200 matrix (eg. [0; 0; 1; 0; 0; 0; 0]). These data are quite "noisy".
net = patternnet(20);
net = train(net,inputs,targets);
My problem is that the results vary each time I restart the training process. What I mean is that if I delete this network and build another one with the same characteristics and the same inputs/targets, the performance of the NN vary greatly.
To give a better idea of my results, I can obtain 91% good calls (with the confusion matrix) one time, and the next time, it is 28%...
Is this normal, or is it a problem with the characteristics of the NN, or could It be my data?
Like I said, I just started using NN, and maybe it's the type of NN that is not correct for my situation, but I thought NN would be more steady in the training process.
Thanks.
댓글 수: 1
Kosai
2012년 6월 13일
Each time a neural network is created, it has semi-random weights and bias values. Hence, when trained it will find a different solution and therefore have different input-output sensitivities.
To consistently get the same solution and input-output sensitivities, for the same network architecture trained on the same data, set the random seed generator to a fixed value (such as pi) before creating and training the network:
rand('seed',pi);
채택된 답변
추가 답변 (1개)
Walter Roberson
2012년 6월 13일
0 개 추천
I do not have the background to know why, but I have seen enough postings here to know that NN training often uses the random number generator. To get the same network for the same input data, use rnd() or one of the other tools to set the state for the random number generator (be sure to set the right random generator, as there can be several simultaneous ones.)
댓글 수: 2
Julien
2012년 6월 14일
Greg Heath
2012년 6월 14일
Walter: Why?
Answer: For a typical RW network node/connection-weight topology, an explicit solution of the nonlinear input-output relationship is untenable. Therefore, weight values that will mimimize the mean-square-error between outputs and design targets are found numerically via nonlinear multivariate optimization (NMO). The solution is made even more difficult by a large number of unknown weights. Multiple random initial trial solutions is a common approach in most NMO methods (e.g., gradient descent). The largest difficulty tends to be dealing with a plethora of non-optimal local minima in the solution space for unknown weights.
Hope this helps.
Greg
카테고리
도움말 센터 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!