Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing the SequentialFeatureSelector to start with a pre-selected feature subset #392

Graylien opened this issue Jun 6, 2018 · 1 comment


Copy link

commented Jun 6, 2018

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.



This comment has been minimized.

Copy link

commented Jun 8, 2018

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.

@rasbt rasbt changed the title How can I initialize Sequential Forward Selection (SFS) X0 != ∅ Allowing the SequentialFeatureSelector to start with a pre-selected feature subset Jun 8, 2018

@rasbt rasbt added this to Enhancements in v 0.14 Roadmap Sep 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.