How to test data on neural network toolbox after training it.
2 ビュー (過去 30 日間)
古いコメントを表示
Hello. I am trying to make a speaker recognition system.
I have used neural network toolbox for training my data using back propogation method. I have stored voice samples (which says 'one')as data. Of the input I gave it took the 60% as train data, 20% as validation data and 20% as test data.The training is successful.
My question is that now how to test the data i.e. if i say the same word 'one' then it should tell that this sample matches with which one of the stored data.
I used y=sim(net,test) where test is the test data. This gives a value of 10.876 in my case.
What does this mean?
Kindly guide me. Thanks,
Nidhi
0 件のコメント
採用された回答
Greg Heath
2012 年 12 月 31 日
Not enough information. Post your code.
How many classes? c = ?
How many input vectors per class?
What version of NNTBX?
Are you using patternnet or the obsolete newpr?
Convert the original c-class target matrix, target0, to c-dimensional unit matrix column form so that size(target) = [ c N ] and sum(target) = ones(1,N). Then class indices are obtained from
classind = vec2ind(target) % class indices
Use 'trainscg' and { 'tansig' 'logsig' }
[net tr ] = train(net,input,target);
tr = tr % reveals training details. Check it out!
newclassind = vec2ind(net(newinput))
Hope this helps.
Thank you for accepting my answer
Greg
5 件のコメント
Greg Heath
2013 年 1 月 5 日
The original 10 an 01 appears to work because the single applied input resulted in an answer that was closer to 10 than 1. In general, however take my previous advice for classifiers: unit matrix columns for targets, classind = vec2ind(t), { 'tansig' 'logsig' }, 'trainscg', [net tr] = train(net,x,t); y = sim(net,x); assignedclass=vec2ind(y); numerrs = sum(cassignedclass ~= classind)
If you take a look at the output from tr you will see that newff automatically divided the data randomly into trn/val/tst and the corresponding errors are given in tr. Therefore the tst errors give an unbiased estimate of predicted error on unseen nondesign data.
Also, y./sum(y) yields consistent estimates of the class posterior probabilities conditional on the input x, i.e., P(i | x ), i=1:c.
Greg Heath
2013 年 1 月 5 日
You didn't pursue all of the training information via
tr.trainParam
tr.performParam
tr.divideParam
tr.perf
tr.vperf
tr.tperf
tr.perf(10)
tr.vperf(10)
tr.tperf(10)
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!