Core Concepts (AI/ML)
Feature Extraction
In shortTurning raw data such as text or images into numerical features, like word weights or embeddings, that a machine learning model can work with.
Feature extraction is the step that turns raw data into numbers a machine learning model can use. Models cannot read a keyword, a page or a product photo directly, so each item is converted into a list of numerical features (a vector) that captures what matters about it. The choice of features largely decides what the model is able to notice.
How it works
The method depends on the data type:
- Text. After tokenisation and cleaning, text is vectorised with counts (bag of words), weights (TF-IDF) or dense embeddings from models such as BERT. Counts and weights give long, sparse vectors with one column per word; embeddings give shorter, dense vectors that capture meaning.
- Images. Colour histograms, dominant colours, or embeddings from a vision model.
- Tabular data. Derived features, such as recency, frequency and monetary value calculated from raw orders.
Feature extraction is usually followed by dimensionality reduction, such as PCA or UMAP, when the vectors are too large to cluster or plot well.
How it’s used in SEO and marketing
- Entity mapping. In the Semantic Keyword Research course, entity names are vectorised with TF-IDF, clustered with K-means, then reduced to two dimensions with PCA for a visual map.
- Topic modelling. BERTopic embeds documents, reduces them with UMAP, clusters them with HDBSCAN, then uses class-based TF-IDF to describe each topic.
- Image clustering. MLforSEO’s colour clustering practical extracts colour features from product images before grouping them.
- Classification. Features such as query length or question words feed intent and query-type classifiers.
Example
Take a list of finance entities: “personal loan”, “car loan”, “credit card”, “credit score”, “crowdfunding”. TF-IDF gives common words such as “loan” and “credit” less weight because they appear across many entity names, and gives a distinctive word like “crowdfunding” more. The resulting vectors let a clustering algorithm group the loan entities together while keeping crowdfunding apart.
Limitations and things to watch
- Poor features cannot be rescued by a better model.
- Sparse count-based features ignore meaning; embeddings capture meaning but are harder to interpret.
- Apply exactly the same pre-processing and vectoriser to new data as to the training data.
- Avoid leakage: never build features from information the model would not have at prediction time.
Learn it on MLforSEO
Where Feature Extraction shows up on MLforSEO
Learn it in a course
Read about it on the blog
Sources and further reading
Other terms from Core Concepts (AI/ML)
- AlgorithmA defined set of steps for solving a problem; in machine learning, the procedure that learns patterns from dat…
- 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…
