How to create a target matrix for neural network?

Hello!
I extracted features from a database of 894 images. Each image had 500 extracted features and this process resulted in an array of 500x894 (This the training data). The database has 5 classes: class 1 has 128 images; class 2 has 312 images; class 3 has 125 images; class 4 has 180 images; and class 5 has 149 images.
So, how do I create target matrix for the network?

2 Comments

YOu can give some number to each class...may be class1 as 1, class5 as 5.

Sign in to comment.

Answers (1)

The classic classifier target matrix for c classes contain columns of the unit matrix eye(c).
The corresponding output layer function is SoftMax with unit sum columns representing class posterior probabilities.
See any reputable neural network text
Thank you for formally accepting my answer
Greg

Categories

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

Asked:

on 29 May 2018

Answered:

on 29 May 2018

Community Treasure Hunt

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

Start Hunting!