def set_params(self, **params):
valid_params = self.get_params()<EOL>for key, value in params.items():<EOL><INDENT>if key not in valid_params:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>% (key, self.__class__.__name__)<EOL>)<EOL><DEDENT>setattr(self, key, value)<EOL><DEDENT>return self<EOL>
Set the parameters of this estimator.

Returns
-------

self