我使用了以下方法:
方差_阈值:selecto_vth = VarianceThreshold(threshold=1.0)
方差分析:anova = SelectKBest(score_func=f_classif, k=20)
相互信息:fs_mutual = SelectKBest(score_func=mutual_info_classif, k=20)
Sequential_Feature_Selector:sfs = SequentialFeatureSelector(RandomForestClassifier(), n_features_to_select=20, scoring='accuracy')
但我没有找到如何获得他们的准确性,不像递归特征消除:
print(accuracy_score(y_test, rfe.predict(x_test))) # it worked