Question

Currently I have 8 possible labels in my sample data (a,b,c,d,e,f,g,h). So I expect from the result the ideal value will be between a and h. But the result only contains 0 or 1 in the ideal value... My data in csv (both for training and testing) looks like this (just an example):

1,2,3,4,a
5,6,7,8,b
1,2,3,9,c
1,2,5,5,d
0,2,2,4,e
1,6,3,4,f
1,2,4,4,g
1,3,3,4,h

Can someone tell me what I did wrong ? Thank you

Was it helpful?

Solution

You will need 8 output neurons to represent the 8 possible labels. Your labels would look something like:

A: [ 1,-1,-1,-1,-1,-1,-1,-1 ]
B: [-1, 1,-1,-1,-1,-1,-1,-1 ]
C: [-1,-1, 1,-1,-1,-1,-1,-1 ]
D: [-1,-1,-1, 1,-1,-1,-1,-1 ]
E: [-1,-1,-1,-1, 1,-1,-1,-1 ]
F: [-1,-1,-1,-1,-1, 1,-1,-1 ]
G: [-1,-1,-1,-1,-1,-1, 1,-1 ]
H: [-1,-1,-1,-1,-1,-1,-1, 1 ]

Then you know what letter is being recognized by which output neuron has the highest activation.

You will also need to normalize your inputs to the range [-1,1] for a neural network.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top