About Neural Network..... How to train Neural Network?

조회 수: 2 (최근 30일)
Muzafar Pandit
Muzafar Pandit 2013년 2월 25일
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

채택된 답변

Greg Heath
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

추가 답변 (1개)

Mohan
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

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by