Search code examples
pythonneural-networkmulticlass-classification

How do we calculate the accuracy of a multi-class classifier using neural network


When the outputs (prediction) are the probabilities coming from a Softmax function, and the training target is one-hot type, how do we compare those two different kinds of data to calculate the accuracy?

(the number of training data classified correctly) / (the number of the total training data) *100%


Solution

  • Usually, we assign the class label with highest probability in the output of the soft max function as the label.