Effacer les filtres
Effacer les filtres

Can target vector of neural network have sum of columns >1?

2 vues (au cours des 30 derniers jours)
manisha bharambe
manisha bharambe le 28 Avr 2015
Commenté : Greg Heath le 2 Mai 2015
i have 56 classes ( 1 , 2, .....56) as output. i want to define target vector for neural network. I have converted classes into binary and output neurons are now 6. So for each column the value is >1. Is it ok? Can u help me to write a code to convert 6 output into original classes?

Réponse acceptée

Greg Heath
Greg Heath le 28 Avr 2015
No! Target columns should be columns of eye(56);
truclassindices = vec2ind(target);
target = ind2vec(truclassindices);
...
output = net(input);
estclassindices = vec2ind(output);
Hope this helps
Thank you for formally accepting my answer
Greg
  2 commentaires
Greg Heath
Greg Heath le 29 Avr 2015
CORRECTION:
The above answer ASSUMED that the classes were mutually exclusive.
If the classes are NOT mutually exclusive e.g., tall, dark, handsome (excuse me for blushing), then the nonzero entries are fractions that sum to 1.
By the way, there are two forms of crossentropy: One for mutually exclusive classes and another for non-mutually exclusive classes.
I have advised MATLAB of this but they have not informed me of any upgrades.
I probably have posted something about this.
Search the NEWSGROUP and/or ANSWERS and/or comp.ai.neural-nets using
greg crossentropy
greg cross-entropy
greg cross entropy
Hope this helps.
Greg
Greg Heath
Greg Heath le 2 Mai 2015
CORRECTION OF THE CORRECTION
If the classes are NOT mutually exclusive e.g., tall, dark, handsome (excuse me for blushing), then the nonzero entries are fractions
THAT DO NOT HAVE TO SUM TO ONE!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Image Data Workflows dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by