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

add groups parameter to SFS and EFS fit(), for forwarding to sklearn cv #537

Merged
merged 3 commits into from
May 17, 2019

Conversation

arc12
Copy link
Contributor

@arc12 arc12 commented May 13, 2019

Description

Add groups as parameter to fit() method of SequentialFeatureSelector and ExhaustiveFeatureSelector for forwarding to sklearn cross-validator fit() methods. e.g. for GroupKFold

Added unit tests to match.

Related issues or pull requests

Issue #524 proposed this feature

Pull Request Checklist

  • Added a note about the modification or contribution to the ./docs/sources/CHANGELOG.md file (if applicable).
  • Added appropriate unit test functions in the ./mlxtend/*/tests directories (if applicable)
  • Ran nosetests ./mlxtend -sv and make sure that all unit tests pass (done for feature selection)
  • flake8 applied to changes made in this PR (I noted flake8 detects multiple existing issues, at least using my standard flake8 config)

Not done (presumed not necessary)

  • Modify documentation in the corresponding Jupyter Notebook under mlxtend/docs/sources/ (if applicable)

@pep8speaks
Copy link

pep8speaks commented May 13, 2019

Hello @arc12! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2019-05-17 05:59:27 UTC

@arc12
Copy link
Contributor Author

arc12 commented May 13, 2019

I see some pep8 line length complaints; I missed these as we've long since moved to 160 chars and have flake8 config to match.
If this is important, please kick it back to me and I'll amend.

@rasbt
Copy link
Owner

rasbt commented May 13, 2019

Thanks for the PR!

Not done (presumed not necessary)
Modify documentation in the corresponding Jupyter Notebook under mlxtend/docs/sources/

The docstring gets loaded in the last cell of the notebook, which then gets converted to HTML documentation during the next version release. So, it's probably not necessary to modify anything at this stage, indeed. However, it would be good to check whether the code examples still all work due to the addition to groups -- maybe there was an example that relied on fit_params or so.

I see some pep8 line length complaints; I missed these as we've long since moved to 160 chars and have flake8 config to match.
If this is important, please kick it back to me and I'll amend.

PEP8 compliance is not crucial but I decided to adopt it as a guideline here some time ago so that the code doesn't become too heterogenous over time. Would be nice if you could break these lines into two to meet the 79 char.

@coveralls
Copy link

coveralls commented May 13, 2019

Coverage Status

Coverage increased (+0.02%) to 91.645% when pulling 8108b0e on arc12:cv-groups into b276396 on rasbt:master.

@rasbt
Copy link
Owner

rasbt commented May 17, 2019

Was just going through the PR, looks great. Thanks a lot! (Along the way, I also made the pep8 changes; so once the tests pass, it should be good to merge!)

Thanks!

@rasbt rasbt merged commit e78846f into rasbt:master May 17, 2019
@arc12
Copy link
Contributor Author

arc12 commented May 17, 2019

great, thanks!
sorry I didnt get around to pep8 tidy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants