scikit-learn has several feature selection tools. When should I use each one?
Loading page content…

Find answers to your programming questions.
scikit-learn has several feature selection tools. When should I use each one?
fclassif prints warnings about constant features and some scores are NaN. Other times I get an error about NaN in the input.
My grid search fails for some values of k.
I run the same code twice and get a different set of selected features. Why aren't the results reproducible?
After one-hot encoding inside a ColumnTransformer, I can't map the selector's output back to the original feature names.
My dataset has columns like 'city' and 'gender'. SelectKBest crashes on them.
I have a few thousand features and RFECV has been running for hours.
I don't know how many features to keep. Also, code I copied from a tutorial uses rfecv.gridscores and now fails with an AttributeError.