EasyDeepLearn

How does Recursive Feature Elimination (RFE) work?

medium

Answer

  • Train the model; rank features by importance (coefficients  for  linear,  featureimportances  for  trees)(\mathrm{coefficients}\;\mathrm{for}\;\mathrm{linear}, \;\mathrm{feature}_{\mathrm{importances}}\;\mathrm{for}\;\mathrm{trees}); remove the least important K features; retrain; repeat until you reach the target count or the score peaks.
  • RFECV wraps this in cross-validation to automatically pick the optimal number of features.
  • Best on medium feature counts (< 1000) where retraining is cheap.
  • Can miss useful features that only matter in combination — trades subtle interactions for interpretability.
Check yourself — multiple choice
  • Random feature elimination
  • Iteratively rank and drop the least important features, retrain, repeat — RFECV picks best count via CV
  • Same as filter methods
  • Only for regression

RFE: iterative rank-and-drop; RFECV chooses the feature count via CV.

#feature-selection

Practise Supervised Learning

215 interview questions in this topic.

Related questions