0

I'm running feature selection with mlxtend library:

classifier = RandomForestClassifier()
sfs = SequentialFeatureSelector(classifier,
           k_features="best", 
           forward=True, 
           floating=True, 
           scoring='average_precision',
           cv=2,
           n_jobs=-1)

But it seems that is preserved features with standard deviation = 0

How can it be ?

I read that wrapper methods suppose to give best results, and it seems that features with STD=0 need to be the first features to exclude.

What am I missing ?

user3668129
  • 4,318
  • 6
  • 45
  • 87
  • Why are you certain that Forward Floating Feature Selection removes features with a standard deviation of 0? Nowhere in the `mlextend` package does it say that. – artemis Nov 02 '20 at 13:22
  • I saw that after using the feature selection, there are some feature with std=0. Features with std=0 doesn't increase the scoring function (and not decrease it), so I wonder if I need to remove them before calling SequentialFeatureSelector – user3668129 Nov 02 '20 at 14:01

0 Answers0