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

2 visualizaciones (últimos 30 días)
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?

Respuesta aceptada

Greg Heath
Greg Heath el 28 de Abr. de 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 comentarios
Greg Heath
Greg Heath el 29 de Abr. de 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 el 2 de Mayo de 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!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Image Data Workflows en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by