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 commentaires

KSSV
KSSV le 29 Mai 2018
YOu can give some number to each class...may be class1 as 1, class5 as 5.
ABSOLUTELY NOT !!!

Connectez-vous pour commenter.

Réponses (1)

Greg Heath
Greg Heath le 29 Mai 2018

0 votes

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

Catégories

En savoir plus sur Deep Learning Toolbox dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by