devnotes.

What is Feature Selection?

Feature selection is the process of choosing the most relevant input variables for a model and discarding the irrelevant or redundant ones. Instead of feeding every column to the algorithm, you keep only those that genuinely help predict the target.

Why select features?

  • Reduces overfitting — fewer noisy features means less chance to memorize noise.
  • Improves accuracy — removes misleading and redundant inputs.
  • Speeds up training and prediction.
  • Simplifies models and makes them easier to interpret.
  • Fights the curse of dimensionality — in high dimensions data becomes sparse and distances lose meaning.
  • Lowers cost of data collection and storage.

Types of irrelevant features

TypeExample
Constant / near-constantA column that is 1 for 99.9% of rows
IrrelevantA random ID number
Redundantheight_cm and height_inch
Highly correlatedtotal_rooms and total_bedrooms
LeakyA column computed from the target

Three families of methods

CategoryHow it worksSpeedExamples
FilterScores features with statistics, independent of the modelFastVariance threshold, correlation, chi-square, ANOVA, mutual information
WrapperTrains a model repeatedly on different feature subsetsSlowForward selection, backward elimination, RFE
EmbeddedSelection happens during model trainingMediumLasso (L1), tree-based importance, Elastic Net

Feature selection vs. feature extraction

SelectionExtraction
IdeaKeep a subset of the original featuresCreate new features from the originals
Original meaning kept?YesNo
ExamplesRFE, Lasso, chi-squarePCA, LDA, autoencoders

Feature extraction is covered in its own chapter.

What is Feature Selection? - Feature Selection | Data Preparation | DevNotes