Indicating Classes' numbers and their effects on classification results in Neural network!

1 view (last 30 days)
I have written a code about classification of 3 groups of data in a supervised classification. The odd thing is that the way I define my classes' number greatly affects my classifier results, for example, when I use numbers 1, 2 and 3 to indicate my classes' numbers and when I use 1-of-N form (each column vector is all zeros with a single 1 indicating the class number), they generate very different results. I even tried to assign more distinct numbers to define my classes' number, such as -20, 0, and 20, but again I came up with very different results. I mean, for example, if my second class leads to a superior result over two other classes, when I am using numbers (1, 2, 3) as a way of defining my classes' numbers; if I use the other method (1-of-N), my first class would have superior results. In other words, the class which wins the classification each time differs based on the way we choose for indicating the classes' numbers while we know just the name of classes has changed not their content.

Accepted Answer

Greg Heath
Greg Heath on 5 Dec 2015
The correct syntax is to use the {0,1} column unit vectors of eye(3). If you use PATTERNNET with the default output function CROSSENTROPY, the outputs are consistent estimates of the input-conditional class posterior probabilities.
Hope this helps.
Thank you for formally accepting my answer
Greg

More Answers (0)

Community Treasure Hunt

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

Start Hunting!