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

set_params should return self for consistency with sklearn #37

Open
jameschapman19 opened this issue Jan 9, 2023 · 0 comments
Open

Comments

@jameschapman19
Copy link

Currently this:

    def set_params(self, **kwargs):
        """Set the given input parameters in the estimator.
        """
        for k in kwargs:
            self.__setattr__(k, kwargs[k])

Should be this:

    def set_params(self, **kwargs):
        """Set the given input parameters in the estimator.
        """
        for k in kwargs:
            self.__setattr__(k, kwargs[k])
        return self

I actually think you can probably just delete the set_params method as there is no need to overwrite it (but guessing I'm wrong given the sklearn developers involved in parsimony!)

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

No branches or pull requests

1 participant