Model Evaluation

Accuracy (ML metric)

In shortAccuracy is the share of all predictions a model gets right. It is the simplest evaluation metric, but it misleads when one class is much more common.

Updated 24 Oct 2026· 2 min read

Accuracy is the proportion of predictions a model gets right out of all the predictions it makes. If a classifier labels 1,000 items and 870 match the correct labels, its accuracy is 87%. It is the simplest and most widely quoted evaluation metric in machine learning, and a sensible first check, as long as you know when it misleads.

How it works

Accuracy = number of correct predictions divided by total number of predictions.

To calculate it you need a test set with known answers, usually a hand-labelled sample the model has not seen during training (see train/test split). In Python, scikit-learn’s accuracy_score takes the true labels and the predicted labels and returns the figure in one line.

For binary classification the four outcomes are true positives, true negatives, false positives and false negatives; accuracy counts the first two as correct. For multi-class classification it is simply the share of items that got the right class.

On MLforSEO, “accuracy score” also refers to a specific score in a Google patent on short answers. That meaning is covered in the separate Accuracy Score entry.

How it’s used in SEO and marketing

  • Checking a classifier (search intent, page type, sentiment) against a labelled sample before running it on a full dataset.
  • Comparing tools or models on the same task, such as NLP APIs versus generative AI.
  • Tracking whether a fine-tuned model actually improved on the pre-trained version.
  • Setting a quality bar for automation: for example, only automate labels where the model reaches an agreed accuracy on your own data.

Example

The MLforSEO comparison of NLP APIs cites an independent test of three sentiment APIs on about 6,000 hand-labelled comments. Each scored between 67% and 72% accuracy, yet all three agreed with each other and with the human label on only 43.3% of items. Similar accuracy figures can hide very different mistakes, which is why you look at more than one metric.

Limitations and things to watch

  • Imbalanced data: if 95% of pages are not spam, a model that labels everything “not spam” is 95% accurate and useless. Use precision and recall or the F1 score when the class you care about is rare.
  • Accuracy treats all errors as equal. Missing a real problem and raising a false alarm may have very different costs.
  • It depends on the test set. A small or unrepresentative sample gives a misleading figure, and testing on training data inflates it (see overfitting).
  • For multi-class problems, check per-class results; a high overall figure can hide one class the model always gets wrong.

Learn it on MLforSEO

Where Accuracy (ML metric) shows up on MLforSEO

Sources and further reading

Other terms from Model Evaluation

See all 16 Model Evaluation terms →