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

all the neighbors algorithms to parameter validation in __init__ #9378

Closed
amueller opened this Issue Jul 16, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@amueller
Member

amueller commented Jul 16, 2017

there's the _init_params method in NeighborsBase and it looks like this is called in __init__.
It looks like this is not called in fit again, so these checks are not done after set_params.
There's also private attributes set in __init__ which makes me think that this could lead to subtle bugs with clone.

(it doesn't set any public attributes, though, and the private attributes are all None)

I think we should not set any attributes in init apart from the init parameters, and we should make check_no_fit_attributes_set_in_init much stricter, to check that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment