Sean Sog Miller
Sean Sog Miller

Reputation: 207

Wrapper Methods for feature selection (Machine Learning) In Scikit Learn

I am trying to decide between scikit learn and the weka data mining tool for my machine learning project. However I realized the need for feature selection. I would like to know if scikit learn has wrapper methods for feature selection.

Upvotes: 6

Views: 5727

Answers (1)

Kevin Markham
Kevin Markham

Reputation: 6050

scikit-learn supports Recursive Feature Elimination (RFE), which is a wrapper method for feature selection.

mlxtend, a separate Python library that is designed to work well with scikit-learn, also provides a Sequential Feature Selector (SFS) that works a bit differently:

RFE is computationally less complex using the feature's weight coefficients (e.g., linear models) or feature importances (tree-based algorithms) to eliminate features recursively, whereas SFSs eliminate (or add) features based on a user-defined classifier/regression performance metric.

Upvotes: 6

Related Questions