Introduction to Machine Learning for SEO
- Practical: Text Classification of page content with Google Natural Language API
- Practical: Clustering of page content with BERTopic
- Practical: Clustering of page content with LDA
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 ✨ ✨
Task Types
In shortA machine learning task that sorts text such as pages, keywords or reviews into predefined categories, learned from labelled examples.
Text classification is the machine learning task of sorting pieces of text into categories you have defined in advance. A model learns patterns from labelled examples (emails marked spam or not spam, pages tagged by topic) and then assigns a label to new text it has never seen. It is a form of supervised learning, and in SEO it is the quiet workhorse behind page tagging, intent labelling and content audits.
Every text classifier needs three things: a set of categories, examples of text that belong to each, and a model that learns to tell them apart. Classic models such as Naive Bayes, decision trees or support vector machines work on word counts or TF-IDF scores, while modern models use embeddings or transformer networks that capture meaning and context. For each item the model returns a label and usually a confidence score, which tells you how sure it is.
The task comes in several shapes. Binary classification picks one of two outcomes, multi-class classification picks one of three or more, and multi-label classification assigns several labels at once, for example a broad topic plus a narrower subtopic. You can train your own model, or use a pre-trained one such as the content classification module of the Google Cloud Natural Language API, which maps a document to a hierarchical taxonomy of categories like /Arts & Entertainment or /Finance.
In the Introduction to ML for SEO course, page content from a site is scraped with Screaming Frog, pasted into Google Sheets and sent to the Natural Language API’s classifyText method through Apps Script. Each row comes back with a category such as /Business & Industrial/Advertising & Marketing and a confidence score. Within minutes you have a topic map of the whole site that you can pivot in Looker Studio, with no code written.