how to set target for neural network

I had extracted feature vector of a signal and saved it in a excel document. feature vector is 128*1922 dimension. I don't know how to create target for this input so i can train the neural network. I need to do signal classification. 35 classes. So, how do i create target vector and train the network?

 Accepted Answer

[ I N ] = size(input) % [ 128 1922 ]
[ O N ] = size(target) %[ 35 1922 ]
Where target columns are columns of the unit matrix eye(35). The relationship between trueclassindices in {1:35} and the corresponding target is
target = full(ind2vec(trueclassindices))
trueclassindices = vec2ind(target)
Estimated output indices are obtained from
output = net (input);
estimatedindices = vec2ind(output);
with
errors = estimatedindices ~= trueclassindices;
Nerrs = sum(errors)
Pcterr = 100*Nerrs/N
I have posted MANY detailed examples in BOTH the NEWSGRIOUP and ANSWERS.
Hope this helps.
Thank you for formally accepting my answer
Greg

More Answers (1)

Create a vector of length 1922 (I assume that is the number of samples you have), in which each value is a member of 1:35 depending on which of the classes the sample corresponds to.
For some of the NN routines, you need to use a binary array rather than a class number. Which NN routine are you using?

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!