-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[MRG+1] Rename all occurrences of size_ngh to n_neighbors for consistency with scikit-learn #109
Conversation
@chkoar we could leave size_ngh and include a warning, allowing n_neighbors in a kwargs. IMO, the user would pass either the Thoughts, @glemaitre ? |
@dvro I think that the solution with Regarding passing the estimator itself, we can think about it and what it is implying on the API design. My only concern is that you are giving a lot of freedom to the user and at the end, getting maybe far from the spirit of the original research paper. What do you think? |
https://github.com/scikit-learn/scikit-learn/blob/51a765a/sklearn/base.py#L162
|
So I don't see other solutions than depreciation cycle such that it will change in version 0.4 |
@glemaitre @dvro yes. We could work with |
I agree! |
@chkoar we let you that one? |
Yeap. Actually, we have to consider removing all occurrences of |
Yep I am working on the testing now, and so one of them in |
Replying to @dvro regarding the We could have the |
ping @glemaitre @dvro |
It seems the best solution for me. At least, the back-compatibility is ensured. |
Ok, great. I'll make the changes at the first chance. |
@chkoar Do you want me to get on that one? |
No problem. You can contribute in my branch or you create a new one and work there. As you said we must provide both parameters in the constructor
What do you think @glemaitre ? |
I think that I already a fork of yours so I will go for that. All you points are correct and I will address them. |
@glemaitre great. There is a need for a rebase, though. So, rebase with the upstream, force push and I will accept all changes. |
@chkoar ok I am going for it now |
@glemaitre There is already a pending PR in chkoar#3 |
Yep I found that back in my branches ;) |
@dvro this PR needs a sweet |
…ency with scikit-learn (scikit-learn-contrib#109) * Rename all occurrences of size_ngh to n_neighbors for consistency with scikit-learn. * Implement deprecation for smote_enn and enn * Add the changes in documentation * Make the changes in the base function * Minor comment fixes
…ency with scikit-learn (scikit-learn-contrib#109) * Rename all occurrences of size_ngh to n_neighbors for consistency with scikit-learn. * Implement deprecation for smote_enn and enn * Add the changes in documentation * Make the changes in the base function * Minor comment fixes
…ency with scikit-learn (scikit-learn-contrib#109) * Rename all occurrences of size_ngh to n_neighbors for consistency with scikit-learn. * Implement deprecation for smote_enn and enn * Add the changes in documentation * Make the changes in the base function * Minor comment fixes
For consistency reasons I think that we should follow scikit-learn conventions in naming the parameters.
I propose to change the
size_ngh
parameter ton_neighbors
. Unfortunately, this change will have impact in the public API. It is an early modification but it will break users code. I don't know if we could merge this change without a deprecation warning.