About Neural Network..... How to train Neural Network?
1 回表示 (過去 30 日間)
古いコメントを表示
I am working on Pedestrian classification. I have data set having positive and negative images. I am using cohog as a feature extraction method. After Extracting features from both image sets I need to give them to Neural Network. Now here I have a confusion whether I have to mix the features of both pos and neg image set. Or train the NN individually. Kindly help me
0 件のコメント
採用された回答
Greg Heath
2013 年 2 月 27 日
The I input features of the N = N0+N1 point class mixture are put in the same input matrix
[ I N ] = size(input)
For c =2 classes it is sufficient to use a binary 0/1 target vector
[ O N ] = size(target) % O = c-1 = 1
For a pattern recognition net with I-H-O node topology, there are
Ntrneq = Ntrn*O % e.g., Ntrn = N - 2*round(0.15*N) ~ 0.7*N
training equations to design
net = patternnet(H);
using
[ net tr ] = train(net,input,target);
The resulting net has
Nw = (I+1)*H+(H+1)*O
unknown weights. Although it is desirable that
H < -1 + ceil((Ntrneq-O)/(I+O+1)
so that Nw does not exceed Ntrneq, it is not necessary if validation set stopping (or regularization using msereg) is used.
The resulting net outputs
y = net(input);
are interpreted as estimates of the class 1 posterior probabilty conditional on the input. The corresponding assigned class indices and error rates are given by
class = round(y);
Nerr1 = sum(class ~= 1)
Nerr0 = sum(class ~= 0)
PCTerr1 = 100*Nerr1/N1
PCTerr0 = 100*Nerr0/N0
PCTerr = 100*(Nerr1+Nerr0)/(N1+N0)
Hope this helps.
Thank you for formally accepting my answer
Greg
0 件のコメント
その他の回答 (1 件)
Mohan
2013 年 2 月 26 日
Use the train function after declaring your net as follows :
net=newff(minmax(in'),[20,1],{'tansig','purelin'},'train');
[net,tr]=train(net,trainInput',trainOutput');
where trainInput would be the "input vector" which has the extracted feature values.
trainOuput would be the corresponding output value - say a "1" for a positive image and a "0" for a negative image
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Deep Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!