Introduction to Machine Learning for SEO
- ML Task Characteristics
- Practical: Clustering images based on color
- Practical: Clustering of page content with BERTopic
Core Concepts (AI/ML)
In shortCompressing data with many features, such as embeddings, into fewer dimensions while keeping the important structure, for clustering or visualisation.
Dimensionality reduction is a family of unsupervised techniques that simplify data with many features into fewer dimensions while keeping as much of the important signal as possible. In SEO work it is most often used to shrink text embeddings, which can have hundreds of dimensions, so they can be clustered efficiently or plotted on a 2D chart.
Each column of data (or each number in an embedding) is a dimension. Reduction methods find a smaller set of new dimensions that preserve the relationships that matter:
In MLforSEO’s guide to mapping keywords to topics, keywords are vectorised with TF-IDF, grouped with K-means, then reduced with PCA to two dimensions so each cluster can be plotted and sanity-checked by eye. With embeddings instead of TF-IDF, the same flow (embed, reduce with UMAP, cluster) is the core of BERTopic.