How to create target matrix for ANN?

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?

 Accepted 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

More Answers (0)

Asked:

raj
on 4 May 2016

Answered:

on 5 May 2016

Community Treasure Hunt

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

Start Hunting!