fclassif prints warnings about constant features and some scores are NaN. Other times I get an error about NaN in the input.
Loading page content…

Find answers to your programming questions.
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?
My dataset has columns like 'city' and 'gender'. SelectKBest crashes on them.
I picked k=10 at random. Is there a principled way to choose it?
I used chi2 / mutualinfoclassif with a numeric target like house prices and got ValueError: Unknown label type: 'continuous'.
I want to see how strongly each feature relates to the target, not just which ones were selected.
I'm getting this error with SelectKBest(chi2, k=5). I applied StandardScaler before feature selection, so some values are negative.