MATLAB: How to create target matrix for ANN

ann target matrix

Hi all,
i had extracted 22 feature of 30 image and saved it in a
excel document. feature vector is 22x30 dimension. I don't know
how to create target for this input so i can train the neural
network.
I need to do classification for 5 different operating
conditions. So, how do i create target vector and train
the network?

Best Answer

The target matrix for a c-class classifier should contain {0,1} unit vector columns from the unit matrix eye(c). The functions IND2VEC and VEC2IND are used to convert from trueclassindices to target vectors and from output vectors to estimatedclassindices.
help ind2vec
doc ind2vec
help vec2ind
doc vec2ind
Examples:
trueclassindices = [ 1 5 2 4 3 ]
target = full(ind2vec([trueclassindices]))
output = fliplr(target)
estimatedclassindices = vec2ind(output)
Hope this helps.
Thank you for formally accepting my answer
Greg