Categorical accuracy

The categorical accuracy metric measures how often the model gets the prediction right.

Categorical accuracy = 1, means the model’s predictions are perfect.

In a multiclass classification problem, we consider that a prediction is correct when the class with the highest score matches the class in the label.

The formula for categorical accuracy is:

\[\begin{array}{rcl} \text{Accuracy} & = & \dfrac{\text{Number of correct predictions}}{\text{Total number of predictions}} \\ \end{array}\]

Suggestions on how to improve

Large discrepancy

If there is a large discrepancy between training and validation accuracy (called overfitting), try to introduce dropout and/or batch normalization blocks to improve generalization. Overfitting means that the model performs well when it’s shown a training example (resulting in a low training loss), but badly when it’s shown a new example it hasn’t seen before (resulting in a high validation loss).

A large discrepancy can also show that the validation data are too different from the training data.

Low accuracy

If the training accuracy is low, the model is not learning well enough. Try to build a new model or collect more training data.

Was this page helpful?
YesNo