Core Concepts (AI/ML)
Algorithm
In shortA defined set of steps for solving a problem; in machine learning, the procedure that learns patterns from data to produce a model.
An algorithm is a precise, step-by-step procedure for solving a problem or completing a task. In machine learning, an algorithm is the method that learns from data: for example k-means, logistic regression or random forest. The result of running a learning algorithm on data is a model, which you then use to make predictions.
How it works
A traditional algorithm follows rules a programmer wrote: “if the URL contains /blog/, label it as a blog post”. A machine learning algorithm writes its own rules by finding patterns in examples. Supervised algorithms learn from labelled examples; unsupervised algorithms look for structure in unlabelled data; reinforcement learning algorithms learn from rewards.
MLforSEO’s framework for choosing one is to describe the problem first. The task (classification, clustering, regression, matching), the data (labelled or not, text or numbers, how much) and the solution requirements (accuracy, explainability, cost) narrow down which family of algorithms fits. Each algorithm also has settings, called hyperparameters, such as the number of clusters in k-means.
How it’s used in SEO and marketing
- Clustering algorithms such as k-means, HDBSCAN or BERTopic for keyword and content clustering.
- Classification algorithms for search intent, sentiment or content categories.
- Matching algorithms such as Levenshtein distance for redirect mapping and duplicate detection.
- Search engine “algorithms”: the ranking systems that combine hundreds of signals and many ML models. When SEOs say “the algorithm”, they usually mean this whole system.
Example
You want to group 5,000 keywords into topics. Your data is unlabelled text, so you need an unsupervised approach. You convert keywords to embeddings, then try k-means (fast, but you must choose the number of clusters) and HDBSCAN (finds the number itself and leaves outliers unclustered). You compare results by reading the clusters and checking a silhouette score, then pick the algorithm that produces groups your team can use.
Limitations and things to watch
- No algorithm is best for every problem. Fit depends on the task, the data and how the result will be used.
- Algorithms reflect the data they learn from, including its gaps and biases.
- Complex algorithms such as deep neural networks can be hard to explain, which matters for decisions you must justify.
- Start simple. A rule-based approach or a pre-trained API is often enough.
Learn it on MLforSEO
- The Characteristics of a Machine Learning Problem: A Task, Data and Solution Framework for SEOs
- How to Find Machine-Learning-Enabled Automation in Your SEO Workflow
- What Machine Learning Classification Is, and Where It Fits in SEO
- What Machine Learning Clustering Is, and Where It Fits in SEO
- Introduction to Machine Learning for SEO (course)
Where Algorithm shows up on MLforSEO
Learn it in a course
Semantic AI-powered SEO Keyword Research
- Traditional Vs Semantic Keyword Research (& why traditional is no longer enough)
- How Google Uses Entities and the Knowledge graph (Patents)
- Practical/Lab Query Entity Extraction with Google NLP and Entity ML-enabled data analysis
AI Search Optimization & Agentic SEO
View course →Read about it on the blog
Try it yourself
Sources and further reading
- https://www.mlforseo.com/ml-fundamentals/characteristics-of-a-machine-learning-problem-seo/ MLforSEO
- https://www.mlforseo.com/machine-learning-implementation-guides/how-to-find-ml-enabled-automation-in-your-seo-workflow/ MLforSEO
- https://www.mlforseo.com/courses/introduction-to-machine-learning-for-seo/ MLforSEO
- Google for Developers: Machine Learning Glossary
- Google for Developers: Machine Learning Crash Course
Other terms from Core Concepts (AI/ML)
- Artificial Intelligence (AI)The broad field of building systems that appear to reason, learn and act intelligently; machine learning is on…
- Bag of WordsA simple way to turn text into numbers by counting how often each word appears in a document, ignoring grammar…
- Bias (AI/ML)When a model systematically favours some outcomes or groups over others because of skewed data, labels, design…
- Data Labelling (Annotation)Adding the correct answer (a category, entity, sentiment or score) to examples, so a supervised model can lear…
- Data Preprocessing (Cleaning)Cleaning, fixing and reshaping raw data so a machine learning model or analysis can use it, from removing dupl…
- Deep LearningA branch of machine learning that trains many-layered neural networks on large datasets; it powers modern lang…
- Dimensionality ReductionCompressing data with many features, such as embeddings, into fewer dimensions while keeping the important str…
- EmbeddingA list of numbers (a vector) that represents the meaning of a word, text, image or entity, so similar things s…
- Explainable AI (Explainability)Explainable AI is the ability to understand and explain why a model produced a particular output, through inte…




