0

I would like to add features manually after feature selection. For example, with this simple pipeline below.

pipe = Pipeline([('feature_selection', SelectFromModel(LinearSVC())),
                 ('clf', ExtraTreesClassifier())])

After feature_selection I would like to try adding add 2 features manually to the selected features and fetch them into the clf. I looked into FeatureUnion and it seems combining transformers and does not accept list of features. Is Sklearn has this capability out of the box? Or do we need to create a custom transformer to add select only the feature we wanted to add, then combine this with feature_selection using FeatureUnion?

Any help would be greatly appreciated!

Darren Christopher
  • 3,893
  • 4
  • 20
  • 37

0 Answers0