-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[WIP] Resolved #195 - removing sklearn.cross_validation DeprecationWarning issue #196
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
[WIP] Resolved #195 - removing sklearn.cross_validation DeprecationWarning issue #196
Conversation
@dvro thanks, can you check the problem with appveyor |
@chkoar @glemaitre this is just a quickfix, not a definitive solution (IMO, we should support sklearn 0.18.X forward, only). |
I think that importing the iterator locally would avoid the double check. |
Not sure that you follow the |
In general yes. But pep8 it is not a panacea. For these purposes I think that's ok. For example check here a local import https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/base.py#L348 |
Ok, but we need to keep track somewhere such that we don't forget about it. I would say in the TODO or whatsnew would be the right place. |
Another option could be that dvro@4225dff |
Deprecation warning
@chkoar that's a cool approach, however, if one tries to the cv_split method anywhere else and the the check_X_y doesn't pass, it won't be clear to the user that this is the problem. maybe using the if else inside the cv_split method? |
I don't mind. Make your changes to see the diff. However, if there is a need in the future to use this approach elsewhere we'll pull out this function to a |
LGTM. |
@glemaitre he has changed the title of the PR back to [WIP] so lets wait |
Adapted StratifiedKFold import doing the following:
now, the following command:
from imblearn.ensemble import EasyEnsemble
do not raise the following deprecation warning: