Join GitHub today
Allowing the SequentialFeatureSelector to start with a pre-selected feature subset #392
First off great library! I found it a few days ago and have already replaced huge chucks of my code with clean elegant solutions from MLXtend. Thank you very much for making this possible and available.
I'm currently working with Sequential Feature Selection and I would like to know if it is possible, or request an enhancement if not possible, that Sequential Feature Selection allow and initial subset from which it starts with.
In my case I have 76 features and I would like to start with an Initial 20 and let forward selection go from there to save computation time, especially if float is involved.
Thanks for the nice words and the suggestion. Seeding the SequentialFeatureSelector with a set of pre-selected features sounds like pretty useful addition, and it would be nice to add this!
Theoretically, this should be straight-forward to implement, but based on the already large code base, I want to be careful to make sure that it works as intended for both forward and backward selection. I am currently a bit busy and it would probably have to wait a little bit.
However, if you need it "right now" for you project :), and if I see that correctly, I think you can change the lines
i.e., the lines
k_idx = () k = 0
if self.forward: if select_in_range: k_to_select = max_k k_idx = () k = 0
in a copy of the code to get that to work until it's implemented.