Skip to content

set_params should return self for consistency with sklearn #37

@jameschapman19

Description

@jameschapman19

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!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions