Feature extraction is the process of transforming raw data, such as images, text, audio or sensor signals, into a smaller set of informative numerical features that a machine learning model can use. A photograph contains millions of pixel values, and a document is a long string of characters. Neither is a convenient input. Feature extraction summarizes them as numbers that capture what matters, such as edges and shapes in a picture or word importance in a text. It is closely related to feature engineering, and it often overlaps with dimensionality reduction, because a good extraction step usually reduces the amount of data while keeping the information needed for the task.
Why feature extraction is needed
Raw data are often high-dimensional, noisy and redundant. Feeding every pixel or every word directly to an algorithm makes learning slow, increases the risk of overfitting and can swamp the signal, a problem called the curse of dimensionality. Extracted features focus on the aspects that are relevant and stable. They can also make different kinds of data comparable, for example by turning both speech and text into vectors, and they allow simple models to work on complex inputs.
Feature extraction vs. feature selection vs. feature engineering
The three terms are related. Feature selection chooses a subset of the existing features and leaves them unchanged. Feature extraction builds new features by combining or transforming the original ones, as in principal component analysis, where each new component is a mix of the original variables. Feature engineering is the broader practice of creating and refining features, using manual design or automatic methods, and it includes both extraction and selection.
Classic feature extraction methods
### For tabular and numerical data
Principal component analysis, or PCA, finds the directions of greatest variation in the data and projects the data onto a few of them. Linear discriminant analysis finds directions that best separate known classes. Independent component analysis separates mixed signals into independent sources, as in separating voices recorded together. Nonlinear methods such as t-SNE and UMAP are mostly used for visualization.
### For images
Before deep learning, vision systems relied on hand-designed descriptors. Edge detectors such as the Canny method find boundaries. The scale-invariant feature transform, or SIFT, developed by David Lowe, detects distinctive points that remain recognizable under changes of scale and rotation. Histograms of oriented gradients, or HOG, summarize the direction of edges in local regions and were widely used for pedestrian detection. Color histograms and texture measures capture overall appearance.
### For text
A bag-of-words model counts how often each word appears. TF-IDF, which stands for term frequency and inverse document frequency, weights words by how common they are in a document and how rare they are across all documents, so distinctive words count more. Word embeddings such as word2vec and GloVe map each word to a vector in which similar meanings are close, and sentence or document embeddings from transformer models extend the idea.
### For audio and signals
Mel-frequency cepstral coefficients, or MFCCs, summarize the frequency content of sound in a way that mimics human hearing, and they were a staple of speech recognition. Spectrograms, wavelet transforms and statistics such as mean, variance and peak frequency are used for vibration, heart rate and other sensor signals.
Learned features in deep learning
Deep neural networks learn features automatically. In a convolutional network for images, early layers respond to edges and colors, middle layers to textures and parts and later layers to whole objects. In language models, hidden states encode meaning and grammar. A trained network can serve as a feature extractor. Practitioners remove its final classification layer, pass data through the remaining layers and use the resulting vector, called an embedding, as input to a simple classifier. This is the feature extraction form of transfer learning, and it works well when labeled data are limited. Autoencoders, which learn to compress and reconstruct data, provide another way to learn compact features without labels.
Applications of feature extraction
It supports face recognition, medical image analysis, speech recognition, document search and classification, spam filtering, recommender systems and anomaly detection. In remote sensing, spectral indices extracted from satellite bands track vegetation and water. In bioinformatics, extracted features from gene expression data help identify disease subtypes. In finance, features extracted from price series support forecasting and trading signals. In industry, features from vibration signals flag worn bearings before they fail.
Advantages and limitations
Feature extraction speeds up training, reduces storage, lowers overfitting, can remove noise and often improves accuracy. It also makes data easier to visualize. The drawbacks are the risk of discarding useful information, the loss of interpretability when new features are mixtures of old ones and the need to choose and tune a method well. Hand-designed features take expertise and may not transfer between tasks, while learned features need large datasets or a suitable pretrained model. Any extraction step must be fitted on training data only, then applied unchanged to new data, to avoid leakage.
A worked example
A team wants to classify support emails by topic. They convert each email into a TF-IDF vector of fifty thousand dimensions, then apply truncated singular value decomposition to compress it to three hundred features, a method known as latent semantic analysis. A logistic regression classifier trained on these features reaches good accuracy and runs quickly. Later, they try a pretrained sentence embedding model as the extractor and find that accuracy improves, because the embeddings capture meaning that word counts miss. They compare the two on a held-out set and choose the better one.
Choosing a feature extraction method
Match the method to the data and the goal. For small tabular datasets where explanation matters, PCA or simple statistics are often enough. For images, text and audio, embeddings from a pretrained model usually give the strongest starting point. Always compare against a simple baseline, check how much information the compact features keep, and fit the extraction step on training data only.
FAQs
Is PCA feature extraction or feature selection? It is feature extraction, because it creates new features from combinations of the original ones.
What is an embedding? It is a vector of numbers, usually produced by a neural network, that represents an item such as a word, image or document.
Do I still need manual feature extraction today? Often less, because pretrained models provide strong features, but classic methods remain useful for small data, signals and interpretable systems.
More in Machine Learning
Key facts
- Feature extraction creates new, usually fewer, features from raw data so that important information is kept and redundancy is removed.1
- Classic methods include principal component analysis, SIFT for images and TF-IDF for text.2
- Deep networks learn features automatically, and their intermediate layers can be reused as feature extractors.3
Related concepts
In the news
Quick checkWhat is the purpose of feature extraction?Show answer
To turn raw, high-dimensional data into a compact set of informative features that make learning easier, faster and often more accurate.
Sources
- scikit-learn, Feature extraction, https://scikit-learn.org/stable/modules/feature_extraction.html
- Wikipedia, Feature extraction, https://en.wikipedia.org/wiki/Feature_extraction
- Yosinski et al., How transferable are features in deep neural networks, https://arxiv.org/abs/1411.1792
Editorially reviewed by Specialty Digest Editorial TeamLast reviewed November 17, 2026Researched and drafted with AI assistanceReport an issue
