How can I ameliorate the Neural network implementation?

1 回表示 (過去 30 日間)
Sa rah
Sa rah 2016 年 1 月 2 日
コメント済み: Greg Heath 2016 年 1 月 5 日
I used these code lines to built a Neural Network classifier in a face recognition project:
net = patternnet(10);
[net,tr] = train(net,feaVectors,labels); % feaVectors=4800*90 and labels=15*90
testY = net(mat_test); % mat_test=4800*75
[c,cm] = confusion(labels_test,testY);
The problem is that I don't get a satisfying result, the true recognition rate is around 50% or less, and that's too low. I don't get why because I think the implementation is correct !! In fact, I use the same inputs with SVM classifier and I get very satisfying results. can you help me in this ?

採用された回答

Greg Heath
Greg Heath 2016 年 1 月 3 日
編集済み: Walter Roberson 2016 年 1 月 3 日
  1. Try not to have have more unknown weights than training equations (OVERFITTING)because there is no guarantee that you will get good performance on nontraining data.
  2. Rank multiple designs by the performance on validation data
  3. Obtain unbiased performance estiamtes using the performance on test data.
  4. It is preferrable to have more training equations than unknown weights. Therefore it is desirable to use as few hidden nodes as possible.
  5. There is a default 0.7/0.15/0.15 RANDOM Ntrn/Nval/Ntst data division
  6. The default initial weights are RANDOM
  7. Given a sufficient number of hidden nodes, you may have to train 10 or 20 nets to obtain one that yields a good set of initial weights.
[ I N ] = size(input) % [ 4800 90 ]
[ O N ] = size(target) % [ 15 90 ]
Ntst = round(0.15*N) % 14
Nval = Ntst % 14
Ntrn = N - Nval-Ntst % 62
Ntrneq = Ntrn*O % 930 training equations
H = 10 % default # of training equations
Nw = (I+1)*H+(H+1)*O = 48175 % Unknown weights
You have more than 50 times as many weights than you have equations (SEVERE OVERFITTING). You should try to use image feature extraction to drastically reduce the number of inputs.
Also, use the training record tr to separate training, validation and testing performance.
Hope this helps.
Thank you for formally accepting my answer
Greg
PS: I have zillions of patternnet posts in the NEWSGROUP and ANSWERS. For initial searches try
patternnet tutorial
and
patternnet greg
  2 件のコメント
Sa rah
Sa rah 2016 年 1 月 3 日
編集済み: Sa rah 2016 年 1 月 3 日
thank you for your answer, but can you please tell me what algorithm do you suggest to use for feature extraction so that the inputs have less dimensions? Do you agree on PCA for example?
Greg Heath
Greg Heath 2016 年 1 月 5 日
In general, PLS is better for classification. However, not sure of the relative difficulty in using both for your problem.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePattern Recognition and Classification についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by