Introduction to Machine Learning for SEO
- Practical: Clustering images based on color
- Practical: Query Entity Extraction with Google NLP and Entity ML-enabled data analysis
ML Models & Algorithms
In shortA dimensionality reduction technique that compresses many features into a few components capturing the most variance, often to plot clusters in 2D.
Principal component analysis (PCA) is a dimensionality reduction technique that turns data with many features into a smaller set of new features, called principal components, while keeping as much of the original variation as possible. In SEO work it is most often used to squeeze high-dimensional text vectors down to two dimensions so clusters can be plotted and inspected.
PCA looks for the directions in the data along which points vary the most:
Keeping two components gives you x and y coordinates for a scatter plot. The “explained variance ratio” tells you how much of the original spread those components retain. PCA is linear: it finds straight-line directions, which makes it fast, stable and repeatable, but less able to show curved or tangled structure than non-linear methods such as UMAP or t-SNE.
In MLforSEO’s keyword-to-topic mapping guide, entities are turned into TF-IDF vectors with one dimension per term, grouped with K-means, then reduced with PCA to two dimensions. The result is a scatter plot where each point is an entity, coloured by cluster, so you can see which clusters are distinct and which overlap.