ATLAS NOVA My AtlasVelocer ↗

Method · Machine learning

Feature engineering

Machine learning data preparation

Feature engineering is the work of deciding what the columns of a dataset should be and how the raw material of a dataset gets turned into them, done before any model is trained.

It sees a table of numbers, and the columns of that table are called features: the measurable input variables a model uses to make its predictions. The same underlying records can be presented to a model in many different ways, and the choice of presentation shapes what the model can learn.

Key facts
85.5Best heart disease accuracy, SVM with filter selection, Noroozi et al. 2023⁠[1]
12.3Lowest test error with 24 features versus 22.1 percent, Shen et al. 2007⁠[2]
86k-nearest neighbour URL identification rate, up from 68 percent, Li et al. 2020⁠[3]
30Robustness gain for selected biomarkers from ensemble selection, Abeel et al. 2010⁠[4]

Overview

Feature engineering

A concrete case makes the idea plain. Electricity meters record a customer's usage once a day, so a year of history is a long sequence of readings. Rather than hand a classifier the raw sequence, one approach summarizes each customer's daily usage into a small set of statistics, such as the mean, the standard deviation, the minimum and the maximum, and treats those summaries as the features. These generated values were used to detect energy theft, and the approach improved both the detection rate and the false positive rate of the gradient boosting classifiers it was paired with, while also reducing their complexity.⁠[5] Nothing about the meters changed; only the shape of the input did.

Three kinds of work

Feature engineering covers three related activities. Feature selection keeps a subset of the existing columns and discards the rest, without altering the representation of the data that remains. Feature extraction goes further and builds a new, smaller set of variables that stand in for the originals, so the columns a model receives are no longer the ones that were measured.⁠[6] Feature construction sits alongside these, deriving new variables from raw ones, as the daily-usage summaries above were derived from meter readings.⁠[5] Selection and extraction are often discussed together because both aim at the same end: removing redundant and irrelevant features so that classification of new cases becomes more accurate.⁠[6]

The need for this work comes from the shape of modern datasets. As the number of features rises, the amount of data required for a reliable analysis grows exponentially, a difficulty known as the curse of dimensionality. High-dimensional data is also noisy, and noise, the error in the variance of a measured variable, can lead a model to mistake small fluctuations for meaningful patterns.⁠[6] Feature selection addresses this by extracting only the most informative features and setting aside noisy, irrelevant and redundant ones, which matters most when the number of features vastly exceeds the number of samples. The generalizability of a model to new data benefits from that reduction, and so does the time it takes to learn.⁠[7]

The work has also become something that can be partly automated. End-to-end systems built on automated machine learning can take raw data and transform it into useful features by automating the intermediate processing stages, including automated feature extraction, feature construction and feature selection.⁠[8] Automation changes who does the work and how quickly, but not what the work is: someone, or some procedure, still has to decide which columns the model will see.

Feature engineering is the design of a model's inputs. Selection trims the columns, extraction replaces them, and construction adds new ones.

History

Where the practice came from

The practice grew out of a specific mathematical problem. As the number of variables in a dataset rises, the amount of data needed to analyse it reliably grows exponentially, and this behaviour was named the curse of dimensionality by Bellman when he was considering problems in dynamic optimisation.⁠[6] The name stuck because the difficulty is not a quirk of any one algorithm. It is a property of high-dimensional spaces themselves, and it turns a dataset that looks large by ordinary standards into one that is thin and sparse once each variable has to be estimated.

The datasets that made the problem urgent were biological. Microarray data is a typical small-sample case: each sample can carry up to 450,000 variables, one per gene probe, so processing a large number of samples carries a high computational cost.⁠[6] Genotype data has the same shape. A typical case-control genotype dataset used in a genome-wide association study can contain up to a million single nucleotide polymorphisms, the single-letter positions in the genome that vary between people, and only a few thousand samples.⁠[7] In both settings the number of features dwarfs the number of cases, and the meaningful signal is a small part of a very wide table.

This is why feature engineering entered these fields as a necessity rather than a refinement. In the genotype workflow, feature selection is placed in the very first step, data pre-processing, alongside quality control, and its purpose is to reduce the training dataset's dimensionality by keeping only features relevant to the phenotype, the observable trait being predicted.⁠[7] The same logic appears in the microarray literature, where the size of the data to be processed grew over a five-year period and feature selection became a requirement before any kind of classification could take place.⁠[6] The work did not begin as a search for elegance. It began because the models would not train well otherwise.

Radiomics shows the pattern repeating in a newer field. The idea of extracting quantitative features from medical images was first proposed in 2012, and studies of it grew exponentially thereafter; a literature search covering 2012 to the end of 2021 returned 560 results for the combined keywords radiomics, lung cancer and CT. Each image can yield hundreds if not thousands of features, which is why a feature selection step is conducted to remove redundant and unstable features before a predictive model is trained.⁠[9] The same arc runs from a wide, cheap-to-generate feature pool to a much smaller set worth modelling.

Automation is the most recent turn. End-to-end systems built on automated machine learning can now take raw data and transform it into useful features by automating the intermediate processing stages, including automated feature extraction, feature construction and feature selection.⁠[8] What began as manual judgement about which columns to keep has become, in part, a procedure that can be run.

The field's origin is a counting problem: too many variables for too few samples, first felt acutely in microarrays and genotype data.

How it works

The curse of dimensionality and the overfitting problem

The trouble with wide tables is not that they are large. It is that the amount of data needed to analyse them reliably grows exponentially with the number of columns, so a dataset that looks generous by ordinary standards becomes thin once each variable has to be estimated separately.⁠[6] Every added feature is another dimension in which the cases must be spread out, and spreading a fixed number of cases across more dimensions leaves them sparse. In a sparse space, patterns that look real are often accidents of where the few points happened to land.

Three numbered panels show a four-bin line, a sixteen-cell square and a sixty-four-cell cube with occupancy calculations.
A line, grid and cube show how four intervals per feature produce exponentially more cells. The counts illustrate coverage rather than a universal sample-size requirement. View full-size image.Dimensionality and Dataset Coverage by Atlas Nova. Illustration generated with AI for this article and checked against its text.

The genotype setting shows the imbalance at its sharpest. The microarray setting has the same shape, with each sample carrying up to 450,000 variables, one per gene probe.⁠[6] In both, the number of features dwarfs the number of cases, and the meaningful signal is a small part of a very wide table.

What goes wrong when a model is handed everything

Training a classifier directly on such data is likely to produce an overfitted model, one that performs well on the data it was trained on but poorly on data it has never seen. Overfitting happens when the model picks up the noise and random fluctuations in the training data as though they were a learned concept.⁠[7] Noise here means the error in the variance of a measured variable, arising from measurement error or natural variation, and machine learning algorithms are sensitive to it.⁠[6] A model that has memorised the noise has learned the particular cases rather than the pattern behind them.

The microarray literature supplies a clean demonstration of the difference between fitting and generalising. When an evolutionary algorithm searched for predictive genes without any feature selection, it could find predictors that gave 100% accuracy on the training set and then performed poorly on the test set. The classes could be distinguished by any of a large number of genes that merely marked a category, but those genes were not necessarily informative in the sense of being activated in a comparable way across both the training and the testing sets; letting uninformative genes into the feature set produced a degree of overfitting.⁠[10] The model had not learned biology. It had learned which samples were which.

Two further costs follow from the same cause. The excessive number of features increases learning and computational time significantly, because irrelevant and redundant features clutter the learning algorithm.⁠[7] And as dimensionality rises, the computational cost usually rises exponentially with it, which is why reducing the number of features under consideration becomes necessary rather than optional.⁠[6] A wide table is therefore expensive twice over: once in the accuracy it costs on new data, and once in the time it takes to train on.

More columns do not mean more information. Past a point they mean a model that memorises its training cases and fails on the next ones.

The remedy follows directly from the diagnosis. Feature selection reduces the training dataset's dimensionality by choosing only features relevant to the phenotype, the observable trait being predicted, and this reduction is what allows a model to generalise well to unseen cohorts.⁠[7] The next sections take up how that choice is actually made.

Selecting features: filters, wrappers and embedded methods

Once a dataset has been reduced to a manageable size, the next question is which columns to keep. Feature selection methods answer it in three broad families, and the families differ in one decisive respect: whether the classifier that will eventually use the features has any say in choosing them.

Filter methods extract features from the data without any learning involved.⁠[6] A filter scores each candidate column by some statistical criterion and keeps the highest scorers, judging features on their own merits rather than on how a particular model will use them. This makes filters very computationally efficient, since no model has to be trained and retrained during the search. The price is that a filter ignores the specific heuristics and biases of the classifier, and ignoring them might lower classification accuracy.⁠[6] A feature that looks weak in isolation may be exactly the one a particular model needs, and a filter has no way to notice.

Filters divide again into univariate and multivariate methods. Univariate methods consider each feature separately, while multivariate methods are able to find relationships among the features.⁠[6] Gene ranking is the classic univariate approach: each gene is scored by how strongly it separates the classes, and the top scorers are kept. Information gain ranking works this way, approximating the conditional distribution of the class given the feature and using information gain as a surrogate for it.⁠[6]

Multivariate filters try to do better by accounting for how features behave together. Correlation-based feature selection follows the principle that a good feature subset contains features highly correlated with the class yet uncorrelated with each other, and it evaluates a whole subset by combining the predictive ability of its members with their degree of redundancy. Minimum redundancy maximum relevance, usually shortened to mRMR, pursues the same two goals with mutual information, a measure of how much one variable tells you about another: it maximizes the relevance of features to the class label while minimizing the redundancy among them. ReliefF takes a different route, repeatedly drawing a sample and giving most weight to the features that help discriminate it from its neighbours of a different class.⁠[6]

Wrapper methods use learning techniques to evaluate which features are useful.⁠[6] A wrapper treats the classifier as part of the scoring function: it proposes a subset, trains the model on it, measures performance, and adjusts the subset accordingly, repeating until it finds a set that works well. Because the search is guided by the model that will actually be used, wrappers can achieve high classification accuracy, but the evaluation phase is very expensive in computing resources.⁠[11] The search itself is hard: finding the best subset is in many cases an NP-hard problem.⁠[6]

Embedded methods combine the feature selection step and the classifier construction.⁠[6] Rather than selecting first and training afterwards, an embedded method builds the selection into the training process itself, so the model arrives already knowing which columns it relied on.

The three families therefore trade speed against awareness. A filter is fast and model-agnostic; a wrapper is slow and model-specific; an embedded method gets model awareness at the cost of being tied to one kind of model. None of this settles which to use, and the choice is not merely technical. A filter that scores features one at a time will miss a feature that matters only in combination with another, while a multivariate filter or a wrapper can in principle find it. The question of interaction, and of redundancy between correlated columns, is taken up later.

Filters judge features without a model, wrappers judge them with one, and embedded methods select while the model is being built.

Each family differs in whether the classifier takes part in choosing features.

Extraction and construction: making new variables

Selection and extraction are often named in the same breath, but they do different things to a dataset. Feature selection keeps a subset of the existing columns and discards the rest, leaving the representation of the surviving data untouched. Feature extraction goes further: it builds a new, smaller set of variables that stand in for the originals, so the columns a model receives are no longer the ones that were measured.⁠[6] A selection step can only ever hand back columns that already existed. An extraction step hands back combinations, projections or summaries that did not.

The distinction matters because extraction can succeed where selection cannot. When two measured variables carry largely the same information, selection must throw one away; extraction can fold both into a single new variable that preserves most of what either held. The cost is interpretability. A retained column still means what it meant in the original table, while a constructed variable may correspond to nothing a domain expert can name. That trade, between compression and legibility, runs through every extraction method.

Projections and approximations

The classical extraction methods search for a projection of the data onto a smaller number of variables that preserves the information as much as possible. Unlike feature selection, feature extraction techniques alter the original representation of the data.⁠[6]

A second family of extraction methods works on the geometry of the problem rather than on the variance. In a study of malicious URL detection, researchers collected 33,162 URLs described by 62 features and applied a combination of linear and nonlinear space transformation methods. For the linear part they performed singular value decomposition to obtain an orthogonal space, then used linear programming to solve for an optimal distance metric; for the nonlinear part they introduced a Nyström method for kernel approximation, a technique that approximates a kernel function from a sample of the data rather than computing it in full.⁠[3] The transformations did not add columns of new measurements. They re-described the existing ones in a space where distances between cases were more meaningful, and the identification rate of a k-nearest neighbour classifier rose from 68 percent to 86 percent, that of a linear support vector machine from 58 percent to 81 percent, and that of a multi-layer perceptron from 63 percent to 82 percent.⁠[3] The raw features were unchanged; their representation was not.

Identification rate before and after feature transformation. Identification rates for three classifiers rose after the space transformations were applied. From this article: “They re-described the existing ones in a space where distances between cases were more meaningful, and the identification rate of a k-nearest neighbour classifier rose from 68 percent to 86 percent, that of a linear support vector machine from 58 percent to 81 percent, and that of a multi-layer perceptron from 63 percent to 82 percent.⁠”⁠[3]

Construction: new columns from old ones

Feature construction is the third activity, and the least glamorous. It derives new variables from raw ones without any projection or matrix factorisation, simply by computing something the raw table did not contain. The electricity-meter case is the cleanest illustration: a year of daily readings per customer was summarized into the mean, standard deviation, minimum and maximum of daily usage, and those generated statistics served as the features for theft detection.⁠[5] Each summary is a construction, a single number standing for a long sequence. The same logic appears in short-term wind power forecasting, where time features were created from the raw records and unimportant features were dropped before an extreme gradient boosting model was trained, and the resulting model produced the highest forecasting accuracy among the models it was compared with.⁠[12]

Construction is where domain knowledge earns its place, because the useful derived variable is usually the one that encodes something a specialist already knows to be relevant. In protein analysis, a toolkit called ProFET extracts hundreds of features covering elementary biophysical and sequence-derived attributes, most of them capturing statistically informative patterns, and different representations of sequences and of the amino acid alphabet provide a compact, compressed set of features.⁠[13] The features are not new measurements. They are computations over a sequence that a model cannot read directly, and they were applied across 17 benchmark datasets involving a variety of binary and multi-class tasks with state of the art performance.⁠[13]

The same principle can operate on a hierarchy rather than on a single record. Microbiome studies describe a sample by the relative abundances of operational taxonomic units, the rough species-level groupings produced by sequencing, and one algorithm exploits the phylogenetic hierarchy, the all-encompassing taxonomy, to abstract those units into broader groups during feature engineering. The rationale is to exploit the often mono- or oligophyletic distribution of relevant (but hidden) traits by virtue of taxonomic abstraction. Applied across a range of datasets distinguishing healthy from diseased samples, the approach gave substantial improvements in classification accuracy over existing microbiota classification tools, regardless of the machine learning technique used, while relying on drastically reduced feature spaces.⁠[14] Generalized features also carry explanatory value, since they give a concise description of a condition rather than a list of hundreds of individual units.

Selection keeps columns, extraction replaces them with projections, and construction computes new ones. Only the first leaves the table recognisable.

Redundancy, interaction and the stability of a chosen set

A feature can be useless for two opposite reasons. It can carry no information about the outcome at all, or it can carry information that another column already carries. The second case is redundancy, and it is the harder one to spot, because a redundant feature often looks strong when scored on its own. Two columns that move together will each appear predictive, and a selection method that judges features one at a time will happily keep both, paying twice for the same signal.

A colored two-by-two outcome matrix is surrounded by numbered explanations and conditional probability calculations for its rows and columns.
A balanced XOR example shows features that predict nothing individually but determine the outcome together. The example illustrates interaction rather than an empirical genetic result. View full-size image.Feature Interaction Through Balanced XOR by Atlas Nova. Illustration generated with AI for this article and checked against its text.

Redundancy in correlated measurements

Biology supplies redundancy on a large scale. Genome-wide association studies typically identify multiple single nucleotide polymorphisms close to each other within a genetic window as associated with a disease, and the reason is linkage disequilibrium, the correlation between nearby variants such that they are inherited together within a population more often than by random chance. Because these variants travel as a block, they carry similar information and can substitute for each other; in a prediction context they are redundant, and including redundant features has been shown to degrade machine learning performance and increase computation time. The sensible move is to let one variant represent the whole block, though the variant with the strongest association signal is not necessarily the causal one, which is why geneticists often link a signal to the locus it belongs to rather than to the individual variant.⁠[7]

The same problem appears wherever a measuring instrument produces many correlated readings. Microarray probes for genes that are co-expressed rise and fall together, and the correlation-based filter described earlier handles this by scoring a whole subset at once, rewarding members that correlate with the class while penalising members that correlate with each other. Minimum redundancy maximum relevance does the same with mutual information, explicitly subtracting redundancy from relevance as it builds the set.⁠[6] Both are attempts to answer a question a univariate ranking cannot even pose: given that this column is already in the set, what does the next one add?

Interaction: features that matter only together

The mirror image of redundancy is interaction, sometimes called epistasis in genetics, where a feature carries little or no signal alone but becomes highly informative in the presence of another. A simplified genetic example makes the shape of it clear. Suppose a first variant shows the same distribution of genotypes among cases and controls, and a second variant does too, so neither affects the phenotype on its own. The combinations behave differently: particular allele pairs at the two positions appear more often in cases than in controls, consistent with that combination conferring increased risk.⁠[7] A method that scores each variant separately sees two useless columns. A method that considers pairs sees one useful interaction.

This matters because GWAS typically use univariate filter techniques, and by construction they do not account for interactions between variants; ignoring those interactions may explain a significant portion of the missing heritability of complex diseases. Machine learning approaches that consider feature interactions have shown benefits to predictive power compared with approaches that consider only simple additive risk contributions.⁠[7] The benefit is not free. Searching for relevant interactions adds computational cost, and whether the search pays depends on the data and on prior assumptions about the disease mechanism; in one study, searching for possible epistatic interactions did not yield a significant increase in predictive accuracy for Crohn's disease, and the genotyping array used may have caused interactions with variants outside the known risk loci to be missed.⁠[7]

Instability: when a small change reshuffles the set

A third problem is that selection is often unstable: run the same method on a slightly different sample and it returns a different set of features, which then yields a different classification accuracy.⁠[15] Instability is not a bug in any one algorithm. When hundreds of correlated candidates compete for a handful of places, many near-equivalent subsets score almost identically, and small perturbations in the training data decide between them. The consequence is practical: a biomarker list that changes with every resampling gives little confidence to the biologist who has to validate it.

Ensemble feature selection addresses this by running several selections and combining their outputs, so that the final set reflects features chosen repeatedly rather than features favoured by one run. Applied to support vector machine based selection on four microarray datasets, ensemble methods increased the robustness of the selected biomarkers by up to almost 30 percent while improving classification performance by roughly 15 percent, with the stability gain most noticeable for small signatures of a few tens of genes.⁠[4] A related approach aggregates the rankings produced by several different filters, combining a chi-square test, a maximum information coefficient and a gradient boosting based ranking through an arithmetic mean, and the aggregated subset improved classification accuracy compared with a single feature selection method.⁠[16] Combining methods exploits their different strengths rather than betting on one.

Hybrid schemes

The natural response to these three problems together is to stop relying on a single method. A hybrid or two-stage approach uses a fast filter first to cut the candidate pool to a manageable size, then applies a more expensive wrapper, embedded or exhaustive search to the survivors. The filter stage can be made multivariate so that it detects interactions rather than discarding half of a pair, and biological knowledge can serve as an a priori filter for pre-selection. Multiple methods can also be run in parallel as an ensemble, which by exploiting the strengths of the different methods allows better accuracy and stability than relying on any single one.⁠[7]

None of this produces a guaranteed answer. A benchmark of 29 selection algorithms and 10 classifiers on 10 public radiomic datasets found that the methods differed largely in training time, stability and similarity, and that no single method consistently outperformed another in predictive performance; simpler methods were more stable than complex ones and did not perform worse.⁠[17] Redundancy, interaction and instability are properties of the data as much as of the algorithm, and the practical response is to combine methods and check that the chosen set survives perturbation.

Correlated columns waste effort, interacting columns hide from univariate scoring, and unstable selection returns a different answer each time. Ensembles and two-stage schemes are the standard defences.

Research

Does feature engineering improve prediction?

The question sounds simple, and the honest answer is that it depends on which model receives the reduced table. Feature selection changes what a model is given, and a changed input can help one learner and hurt another, because each learner has its own way of coping with wide, noisy data. A method that removes columns a model was already handling well can take away signal along with clutter. This is why the evidence is best read model by model rather than as a single verdict on the practice.

Figure 1. Mental fatigue EEG test error by feature set. Lowest test error rate of random forest classifiers using different numbers of top-ranked features from 304 extracted features. The source states: “RF with RFE achieved its lowest test error rate of 12.3% using 24 top-ranked features, whereas RF with INIT reached its lowest test error rate of 15.1% using 64 top-ranked features, compared to a test error rate of 22.1% using all 304 features.” (Kai-Quan Shen et al. (2007)).⁠[2]

Gains and losses in the same experiment

The clearest demonstration comes from a comparison of sixteen selection techniques across three families, applied to a heart disease dataset and paired with seven learning algorithms. The headline result was that selection improved some models and degraded others: two of the algorithms tested, a multilayer perceptron and a random forest, performed worse after feature selection. The same study found that the best accuracy, 85.5 percent, came from a support vector machine combined with correlation-based, information gain and symmetrical uncertainty filters, with an improvement of about 2.3 points in accuracy and 2.2 in F-measure. The filters that kept the most features produced the best accuracy, precision and F-measure, while wrapper and evolutionary methods did better on sensitivity and specificity.⁠[1] The pattern is not that selection works or fails. It is that the pairing of selection method and classifier decides the outcome, and a practitioner who selects features without checking the model that will use them is guessing.

The same caution applies to how the gain is measured. A benchmark of 29 selection algorithms and 10 classifiers on 10 public radiomic datasets found that the methods differed widely in training time, stability and similarity, and that no single method consistently outperformed another in predictive performance; simpler methods were more stable than complex ones and did not do worse on the area under the curve.⁠[17] That result sits awkwardly beside any claim that one selection scheme is the right default. It says the choice is real, the differences are measurable, and the ranking depends on the data in front of you.

Where the gains are large

Some settings show improvements too large to attribute to noise, and they tend to share a feature: the raw representation is a poor fit for the classifier, so re-describing the data changes what the model can see. Malicious URL detection is one. With 33,162 URLs described by 62 features, a combination of linear and nonlinear space transformations raised the identification rate of a k-nearest neighbour classifier from 68 percent to 86 percent, a linear support vector machine from 58 percent to 81 percent, and a multi-layer perceptron from 63 percent to 82 percent.⁠[3] Those are not marginal shifts. The transformations re-described the same 62 measurements in a space where distances between cases carried more meaning, and the classifiers responded to the new geometry.

Network intrusion detection shows a similar pattern with a different mechanism. A hybrid scheme used two filters, information gain and a random forest ranking, to shrink the search space, then applied recursive feature elimination as a wrapper; on the UNSW-NB15 dataset the feature count fell from 42 to 23 while multi-class accuracy rose from 82.25 percent to 84.24 percent.⁠[18] A separate study on the same dataset used a gradient boosting based filter and reported that a decision tree's test accuracy rose from 88.13 percent to 90.85 percent for binary classification.⁠[19] The gains here are smaller than in the URL case, a couple of points rather than twenty, but they come with a halved feature set, which matters when detection has to run at network speed.

Small sets, large error reductions

The most striking reductions in error come from studies where the feature pool was deliberately oversized and the selection step was allowed to be aggressive. In a mental fatigue study, EEG was recorded from 12 subjects over 25-hour sessions and 304 features were extracted; a random forest paired with recursive feature elimination reached its lowest test error of 12.3 percent using 24 top-ranked features, against 22.1 percent using all 304. A heuristic ranking scheme in the same study reached 15.1 percent with 64 features. Cutting the feature set by more than ninety percent reduced the error rate from 22.1 percent to 12.3 percent, and 17 of the 24 selected features were consistent across subjects.⁠[2]

What unites these cases is that the original feature set was redundant or poorly scaled for the task. When hundreds of columns measure overlapping aspects of the same signal, a model trained on all of them spends its capacity on noise. Selection forces a choice, and the choice is often better than the average of everything available.

The evidence does not crown a winner

Across datasets and classifiers, the studies point the same way on one point: there is no single best selection method. A comparison of four filter ranking methods and fourteen filter subset methods, evaluated with four classifiers over five software defect datasets from a NASA repository, found that the application of selection improved predictive performance, but that the performance of the methods varied across datasets and classifiers. Information gain gave the greatest improvements among the ranking methods and a consistency-based subset method did best among the subset methods, yet models built on ranked features proved more stable than those built on subsets.⁠[20] The authors' conclusion, that no single method is best, is the same conclusion the radiomics benchmark reached from a different direction.⁠[17]

This is not a counsel of despair. It is a description of what selection is: a search over a space of possible feature sets, guided by criteria that each encode a different guess about what makes a feature useful. A filter that scores columns one at a time will favour features with strong individual signal; a wrapper that trains a model will favour features that help that model; an embedded method will favour features the model's own fitting procedure can exploit. When these disagree, the disagreement is information, not error.

Feature engineering improves prediction often, but not uniformly. The gain depends on the pairing of selection method and model, and no single method wins across datasets.

The practical reading of the evidence is that selection should be treated as part of the model, not as a preliminary chore. The heart disease comparison showed gains and losses within one experiment; the intrusion studies showed that a well-chosen hybrid can cut the feature count in half while raising accuracy; the URL study showed that re-describing features can lift a classifier by twenty points; and the mental fatigue study showed that a small, stable set can nearly halve the error rate.⁠[3][19][1][2][18] Against these sit the benchmarks finding no consistent winner.⁠[17][20] The reasonable conclusion is that feature engineering reliably changes prediction, sometimes upward and sometimes down, and that measuring the change on held-out data is the only way to know which happened.

In practice

Using feature engineering in practice

In a working pipeline, feature engineering is not a single step but a sequence with a fixed order. The genotype workflow places quality control and feature selection together in the first stage, before any algorithm is chosen or trained, and quality control comes first: variants with low call rates, variants that deviate from Hardy-Weinberg equilibrium, and samples with missing genotypes are removed, and variants with a minimum allele frequency below 0.01 can be dropped as well. The goal of that stage is a high-quality dataset with which to train the prediction model.⁠[7] Selection applied to dirty data simply chooses among errors.

Three horizontal lanes show quality control, clean feature pools, selection methods, model fitting and evaluation, with three branches in the parallel lane.
Single selection uses one method, serial selection filters successive survivors, and parallel selection compares independent branches. Quality control precedes selection and each resulting model receives held-out evaluation. View full-size image.Single Serial and Parallel Selection by Atlas Nova. Illustration generated with AI for this article and checked against its text.

Serial and parallel combinations

Once the pool is clean, the practical question is how many selection methods to run and in what arrangement. Radiomics studies answer it in three patterns. A single method study uses one selection technique alone. A serial method study applies methods in sequence, each step reducing the dimensionality further.

A parallel method study tests several single methods independently and compares the results. The serial pattern has a characteristic shape: a reproducibility filter such as the intraclass correlation coefficient or the concordance correlation coefficient is applied first, most often as the opening step, and a shrinkage method follows on what survives. The first stage assesses whether a feature can be measured reproducibly; the second applies a shrinkage method such as LASSO to what survives.⁠[9]

LASSO is the most widely used method in both the single-method and serial-method categories, likely due to its strong covariate reduction capabilities, and the maximum relevance minimum redundancy method is most often used serially, run first and followed by LASSO on its results. Parallel schemes can be elaborate: one reviewed study employed as many as 13 selection methods at once. Parallel-method studies test multiple single methods independently to achieve better results.⁠[9]

Domain knowledge as a filter

A second practical move is to let expertise do some of the selection before any algorithm runs. Biological knowledge can serve as an a priori filter for pre-selecting variants, narrowing the candidate pool on grounds that have nothing to do with the training data. This is cheaper than a statistical search and it can protect against a subtle failure: when the data do not uniformly cover the genome, a purely data-driven search for interactions may miss important ones involving variants outside the regions that were measured.⁠[7]

Domain knowledge can also enter through the features themselves rather than through a filter. In antimicrobial peptide prediction, each peptide was coded with 270 features drawn from amino acid composition and pseudo-amino acid composition, the latter incorporating electrostatic charge, codon diversity, molecular volume, polarity and secondary structure. Selection then reduced those 270 to an optimal subset of 25, and the amino acid composition features accounted for 64% of the chosen set.⁠[21] The chemistry that made those features worth computing was known before the search began; the search decided only which of them to keep.

What a finished selection looks like

The end product is usually a very short list. Across the CT lung cancer radiomics studies reviewed, the average number of features selected for model training was under ten, even though individual studies extracted anywhere from 14 to over 1000 features beforehand.⁠[9] A typical study therefore discards the overwhelming majority of what it measured. That ratio is not a sign of failure. It reflects how much of an extracted feature pool is redundant, and it is why the selection step carries so much of the model's eventual behaviour.

Combining a sequence alignment method, which handled 5855 of the 9731 benchmark peptides, with the feature-selection predictor built on 25 features for the remainder gave an overall jackknife sensitivity of 80.23%, accuracy of 93.31%, and a Matthews correlation coefficient of 0.73. Neither method covered the whole dataset alone; the alignment method could not process every peptide, and the feature-based predictor was weaker on its own.⁠[21] The practical lesson is that a short selected feature set is often paired with other evidence rather than asked to carry the whole decision.

In practice the order is fixed: clean the data, filter on reproducibility or domain knowledge, then select, often in series. The surviving set is usually small.

Alternatives

Choosing a method when the evidence gives no clear winner

The families described earlier differ in how they spend effort. A filter scores features without training a model, which makes it very computationally efficient, while a wrapper trains and retrains a classifier to judge each candidate subset, which buys model awareness at a cost in computing resources.⁠[6] That trade explains a pattern seen repeatedly: filters are the practical choice when the feature pool is enormous and the search must finish, and wrappers are the choice when accuracy on one known classifier matters more than time. Neither preference is a finding about which family predicts better. It is a statement about what each family can afford to look at.

A dataset branches into training, validation and test sets, with two candidate pipelines feeding comparison and a chosen pipeline feeding final assessment.
Training data fits candidate selection and classifier pipelines, while validation data helps choose between them. An untouched test set supplies the final predictive assessment. View full-size image.Choosing Pipelines With Held-Out Data by Atlas Nova. Illustration generated with AI for this article and checked against its text.

The choice of criterion inside a family matters as much as the family itself. A univariate ranking scores each column alone, so it cannot see a feature that only matters in combination with another; a multivariate filter or a wrapper can, in principle, find such a pair.⁠[6] That difference is invisible on datasets where features act independently and decisive on datasets where they do not. A practitioner who picks a method by reputation rather than by asking whether the underlying signal is additive is choosing blind.

Comparisons across many datasets tend to dissolve any ranking of methods. A benchmark of 29 selection algorithms and 10 classifiers on 10 public radiomic datasets found that the methods differed largely in training time, stability and similarity, and that no single method consistently outperformed another in predictive performance; simpler methods were more stable than complex ones and did not perform worse on the area under the curve. The same benchmark noted that analysis of variance, LASSO and an ensemble form of minimum redundancy maximum relevance appear to be good choices in terms of predictive performance, as they outperformed most other methods tested.⁠[17] The useful signal there is not a champion but a direction: complexity bought stability losses without buying accuracy.

Sample size shifts the answer again. In a proteomics and metabolomics comparison, six selection methods were tested on human urine and porcine cerebrospinal fluid samples spiked with peptides at known concentrations, which allowed the accuracy of selection to be judged directly against the list of spiked compounds rather than inferred from classification error. The univariate t test and the Mann-Whitney-Wilcoxon test were not applicable at the smallest sample size of six, improved markedly as samples increased, and beyond about twelve samples outperformed the other methods; principal component discriminant analysis and partial least squares discriminant analysis returned small, precise sets that nevertheless missed many true positives, while nearest shrunken centroid struck a reasonable balance between recall and precision across all datasets.⁠[22] A method's standing therefore depends on how much data it has to work with, not only on how it scores features.

Drug discovery supplies a starker version of the same lesson. Five selection methods were compared on chemical compounds classified by Naïve Bayesian and support vector machine models, and the two learners responded in opposite directions: the Naïve Bayesian classifier benefited significantly from selection, while the support vector machine performed better when all features were used. With information gain as the criterion, removing up to 96% of features improved the Naïve Bayesian classifier's sensitivity, whereas the support vector machine lost only a few percentage points of sensitivity and specificity when the feature space was cut by 99%.⁠[23] The same reduced table helped one model and hurt the other, which means the selection method cannot be evaluated apart from the classifier it feeds.

Metaheuristic search adds a further caution. A review of metaheuristic selection methods proposed between 2018 and 2022 concluded that some of these algorithms cannot perfectly solve the selection problem on all types of datasets at acceptable speed, and that a particular metaheuristic should be chosen according to the dataset at hand.⁠[24] That is a statement about search behaviour, not about any one algorithm's quality.

What remains is a procedure rather than a rule. Match the criterion to the suspected structure of the signal, prefer the simpler method when stability matters, and test the candidate on held-out data with the classifier that will actually be deployed. The limits of that procedure, and the cases where selection removes something worth keeping, are covered later.

No family or algorithm wins across datasets. The defensible method is the one matched to the signal's structure, the sample size and the classifier, and checked on held-out data.

Criticism

Limits, costs and open problems

Every gain described so far was bought with something, and the costs are easiest to see in the search for interactions. Looking for pairs of features that matter only together means evaluating combinations rather than single columns, and the number of combinations grows far faster than the number of columns. Searching for relevant interactions therefore adds computational cost, and whether the search is worth running depends on the nature of the input data and on prior assumptions about the mechanism behind the outcome. When the data do not uniformly cover the relevant regions, a search for interactions can miss important ones entirely, so the extra expense may buy nothing.⁠[7]

Five colored rows enumerate subsets of four letters beside counting formulas, a numerical comparison table and three method explanation boxes.
Sixteen subsets of four features demonstrate how candidate sets multiply. Formulas compare pair and subset counts for four and twenty features. View full-size image.Combinatorial Cost of Feature Search by Atlas Nova. Illustration generated with AI for this article and checked against its text.

The payoff is not guaranteed even when the search is well aimed. In a study of Crohn's disease, searching for possible epistatic interactions did not yield a significant increase in predictive accuracy, and the genotyping array used may have caused interactions with variants outside the known risk loci to be missed.⁠[7] A negative result of that kind is hard to interpret: it may mean the disease has little interaction structure, or it may mean the measurement could not see the structure that exists. Either way, the computational effort was spent without a return on that dataset.

Selection can also fail more quietly, by removing information the model was using. The heart disease comparison found that two of the algorithms tested, a multilayer perceptron and a random forest, performed worse after feature selection.⁠[1] In drug discovery the split ran along the classifier rather than the dataset: a Naïve Bayesian classifier benefited significantly from selection, while a support vector machine performed better when all features were used.⁠[23] A reduced table is not a neutral improvement. It is a different problem, and some learners are better served by the wide one.

The gap between a statistical choice and a biological one

A selected feature is a column that helped a model, and that is a weaker claim than it sounds. Filter methods can be highly accurate at classifying, yet no biological significance is proven for the genes they identify, and none of the standard filters indicates whether its results are actually biologically relevant.⁠[6] The distinction matters because selection is often read as a discovery procedure. A short list of genes that separates cases from controls may reflect the way the samples were collected, the platform used, or the correlation structure among probes rather than anything about the disease. Treating the list as a finding, rather than as a candidate set awaiting validation, is a category error.

A related limitation is structural. Most existing selection methods depend on univariate ranking, which does not take into account interactions between variables, and they overlook the stability of the selection algorithms; methods that produce good accuracy tend to employ more features rather than fewer. Developing a universal method that achieves the best classification accuracy with fewer features remains an open research area.⁠[25] That sentence describes a gap in the field, not a gap in effort: the two goals, accuracy and parsimony, pull against each other, and no procedure yet satisfies both at once.

No universal method, and no shortcut around testing

The absence of a clear winner is itself a limit on what can be recommended. Advice of that shape is honest but thin. It tells a practitioner that the choice matters and that it cannot be made in advance from the method's description alone.

Computational expense closes the circle. Filters are cheap because they never train a model, wrappers are expensive because they train one for every candidate subset, and the search for an optimal subset is in many cases NP-hard, so no efficient algorithm is known that guarantees the best answer.⁠[6] Where the feature pool runs to hundreds of thousands of columns, as it does in genotype and microarray data, an exhaustive search is not merely slow but impossible, and every practical method is a compromise that gives up the guarantee of optimality for the ability to finish.⁠[7][6]

What remains is a discipline rather than a recipe. Selection changes prediction, sometimes upward and sometimes down, and the only way to learn which happened on a given problem is to measure it on data the model has not seen. The open problems, interaction search that pays for itself, selection that is both accurate and stable, and features whose statistical strength corresponds to something real, are unsolved in general and are likely to stay that way, because each depends on the data and the question rather than on the algorithm alone.

Selection is a search under constraints, not a guarantee. Its costs are computation, lost signal and unproven meaning, and its results must be validated rather than trusted.

Key studies

YearStudySampleDesignFinding
2004Liu⁠[23]chemical compounds classified by Naive Bayesian and support vector machinecomparative study of five feature selection methods for drug discoveryInformation gain with Naive Bayesian removed up to 96% of features and improved sensitivity, while the support vector machine performed better with all features.
2005Jirapech-Umpai & Aitken⁠[10]7,070 genes, 38 training samples and 34 test samples from the leukemia datasetevolutionary algorithm with an initial gene selection stepWithout feature selection, training accuracy reached up to 98% but test accuracy was 68% at best; gene selection significantly improved test performance.
2007Kai-Quan Shen et al.⁠[2]12 subjects, each recorded for a 25-hour durationmultilevel mental fatigue EEG classification with random forest feature selection, using data from 12 subjects each recorded over a 25-hour durationRecursive feature elimination reached a 12.3% test error rate with 24 features, against 22.1% with all 304 features.
2010Abeel et al.⁠[4]four microarray datasetslarge-scale analysis of ensemble feature selection with support vector machinesEnsemble feature selection raised the stability of selected biomarkers by up to almost 30% and improved classification performance by approximately 15%.
2013Christin et al.⁠[22]human urine and porcine cerebrospinal fluid samples spiked with peptidescomparison of six feature selection methods for biomarker discoveryThe t test and Mann-Whitney-Wilcoxon test were not applicable at n = 6 but outperformed other methods above n > 12.
2019Balogun et al.⁠[20]five software defect datasets from the NASA repositoryevaluation of four filter feature ranking and fourteen filter feature subset selection methods with four classifiersFeature selection improved predictive performance, but no single method was best across datasets and classifiers.
2020Li et al.⁠[3]feature engineering with linear and nonlinear space transformationsk-nearest neighbor identification rose from 68% to 86%, linear support vector machine from 58% to 81%, and multilayer perceptron from 63% to 82%.
2020Kasongo & Sun⁠[19]UNSW-NB15 intrusion detection datasetfilter-based feature reduction with XGBoost followed by five classifiers, using a reduced set of 19 attributesFeature selection produced a reduced set of 19 attributes, and the decision tree's test accuracy rose from 88.13% to 90.85% for binary classification.
2022Demircioğlu⁠[17]10 publicly available radiomic datasetsbenchmark comparison of 29 feature selection algorithms and 10 classifiersNo method consistently outperformed another on predictive performance, and simpler methods were more stable.
2023Noroozi et al.⁠[1]Cleveland Heart disease datasetcomparison of sixteen feature selection techniques across three categories with seven algorithmsFeature selection improved some models such as j48 but decreased performance in others such as MLP and RF, with a best-case gain of +2.3 in model accuracy.
2023Yin et al.⁠[18]UNSW-NB15 datasethybrid filter and wrapper feature selection for multilayer perceptron intrusion detectionFeatures fell from 42 to 23 and multiclass accuracy rose from 82.25% to 84.24%.

See also

References

  1. Noroozi, Z., Orooji, A., & Erfannia, L. (2023). Analyzing the impact of feature selection methods on machine learning algorithms for heart disease prediction. Scientific Reports, 13(1). doi:10.1038/s41598-023-49962-w
  2. Kai-Quan Shen, Chong-Jin Ong, Xiao-Ping Li, Zheng Hui, & Wilder-Smith, E. P. V. (2007). A Feature Selection Method for Multilevel Mental Fatigue EEG Classification. IEEE Transactions on Biomedical Engineering, 54(7), 1231-1237. doi:10.1109/tbme.2007.890733
  3. Li, T., Kou, G., & Peng, Y. (2020). Improving malicious URLs detection via feature engineering: Linear and nonlinear space transformation methods. Information Systems, 91, 101494. doi:10.1016/j.is.2020.101494
  4. Abeel, T., Helleputte, T., Van de Peer, Y., Dupont, P., & Saeys, Y. (2010). Robust biomarker identification for cancer diagnosis with ensemble feature selection methods. Bioinformatics, 26(3), 392-398. doi:10.1093/bioinformatics/btp630
  5. Punmiya, R., & Choe, S. (2019). Energy Theft Detection Using Gradient Boosting Theft Detector With Feature Engineering-Based Preprocessing. IEEE Transactions on Smart Grid, 10(2), 2326-2329. doi:10.1109/tsg.2019.2892595
  6. Hira, Z. M., & Gillies, D. F. (2015). A Review of Feature Selection and Feature Extraction Methods Applied on Microarray Data. Advances in Bioinformatics, 2015, 1-13. doi:10.1155/2015/198363
  7. Pudjihartono, N., Fadason, T., Kempa-Liehr, A. W., & O'Sullivan, J. M. (2022). A Review of Feature Selection Methods for Machine Learning-Based Disease Risk Prediction. Frontiers in Bioinformatics, 2. doi:10.3389/fbinf.2022.927312
  8. Mumuni, A., & Mumuni, F. (2025). Automated data processing and feature engineering for deep learning and big data applications: A survey. Journal of Information and Intelligence, 3(2), 113-153. doi:10.1016/j.jiixd.2024.01.002
  9. Ge, G., & Zhang, J. (2023). Feature selection methods and predictive models in CT lung cancer radiomics. Journal of Applied Clinical Medical Physics, 24(1). doi:10.1002/acm2.13869
  10. Jirapech-Umpai, T., & Aitken, S. (2005). Feature selection and classification for microarray data analysis: Evolutionary methods for identifying predictive genes. BMC Bioinformatics, 6(1). doi:10.1186/1471-2105-6-148
  11. Liu, C., Wang, W., Zhao, Q., Shen, X., & Konan, M. (2017). A new feature selection method based on a validity index of feature subset. Pattern Recognition Letters, 92, 1-8. doi:10.1016/j.patrec.2017.03.018
  12. Zheng, H., & Wu, Y. (2019). A XGBoost Model with Weather Similarity Analysis and Feature Engineering for Short-Term Wind Power Forecasting. Applied Sciences, 9(15), 3019. doi:10.3390/app9153019
  13. Ofer, D., & Linial, M. (2015). ProFET: Feature engineering captures high-level protein functions. Bioinformatics, 31(21), 3429-3436. doi:10.1093/bioinformatics/btv345
  14. Oudah, M., & Henschel, A. (2018). Taxonomy-aware feature engineering for microbiome classification. BMC Bioinformatics, 19(1). doi:10.1186/s12859-018-2205-3
  15. Hoque, N., Singh, M., & Bhattacharyya, D. K. (2018). EFS-MI: an ensemble feature selection method for classification: An ensemble feature selection method. Complex & Intelligent Systems, 4(2), 105-118. doi:10.1007/s40747-017-0060-x
  16. Wang, J., Xu, J., Zhao, C., Peng, Y., & Wang, H. (2019). An ensemble feature selection method for high-dimensional data based on sort aggregation. Systems Science & Control Engineering, 7(2), 32-39. doi:10.1080/21642583.2019.1620658
  17. Demircioğlu, A. (2022). Benchmarking Feature Selection Methods in Radiomics. Investigative Radiology, 57(7), 433-443. doi:10.1097/rli.0000000000000855
  18. Yin, Y., Jang-Jaccard, J., Xu, W., Singh, A., Zhu, J., Sabrina, F., & Kwak, J. (2023). IGRF-RFE: a hybrid feature selection method for MLP-based network intrusion detection on UNSW-NB15 dataset. Journal of Big Data, 10(1). doi:10.1186/s40537-023-00694-8
  19. Kasongo, S. M., & Sun, Y. (2020). Performance Analysis of Intrusion Detection Systems Using a Feature Selection Method on the UNSW-NB15 Dataset. Journal of Big Data, 7(1). doi:10.1186/s40537-020-00379-6
  20. Balogun, A. O., Basri, S., Abdulkadir, S. J., & Hashim, A. S. (2019). Performance Analysis of Feature Selection Methods in Software Defect Prediction: A Search Method Approach. Applied Sciences, 9(13), 2764. doi:10.3390/app9132764
  21. Wang, P., Hu, L., Liu, G., Jiang, N., Chen, X., Xu, J., Zheng, W., Li, L., Tan, M., Chen, Z., Song, H., Cai, Y. D., & Chou, K. C. (2011). Prediction of Antimicrobial Peptides Based on Sequence Alignment and Feature Selection Methods. PLoS ONE, 6(4), e18476. doi:10.1371/journal.pone.0018476
  22. Christin, C., Hoefsloot, H. C. J., Smilde, A. K., Hoekman, B., Suits, F., Bischoff, R., & Horvatovich, P. (2013). A Critical Assessment of Feature Selection Methods for Biomarker Discovery in Clinical Proteomics. Molecular & Cellular Proteomics, 12(1), 263-276. doi:10.1074/mcp.m112.022566
  23. Liu, Y. (2004). A Comparative Study on Feature Selection Methods for Drug Discovery. Journal of Chemical Information and Computer Sciences, 44(5), 1823-1828. doi:10.1021/ci049875d
  24. Sadeghian, Z., Akbari, E., Nematzadeh, H., & Motameni, H. (2025). A review of feature selection methods based on meta-heuristic algorithms. Journal of Experimental & Theoretical Artificial Intelligence, 37(1), 1-51. doi:10.1080/0952813x.2023.2183267
  25. Walowe Mwadulo, M. (2016). A Review on Feature Selection Methods For Classification Tasks. International Journal of Computer Applications Technology and Research, 5(6), 395-402. doi:10.7753/ijcatr0506.1013

Cite this page: Atlas Nova editors. (2026). Feature engineering. Atlas Nova. https://velocer.io/atlas/feature-engineering/