Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ann responses are one-hot encoded

when training e.g. a 3-class problem, and the class is 0, you would feed a [1 0 0] vector into the training, for class 2 [0 0 1], one value for each output node of the network.

in the prediction, you get the similar network output back in the response matrix, the index of the highest value denotes the class-id. you could use minMaxLoc() to determine it, or in the case of predicting on a single feature, the return value of the predict() function.