Introduction to Machine Learning for SEO
- Advantages and Scenarios of Using ML-enabled Automation
- ML Solution Characteristics
- Practical: Methods for search intent classification – Rule-based and ML-enabled Classification
NEW: AI Search Optimisation and Agentic SEO Course by Beatrice Gamba -> Immediate start, on-demand learning for how to optimise for discovery in agentic search ✨ ✨
Model Evaluation
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.
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.
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.
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.