def set_params(self, **parameters):
    'Set the parameters in a sklearn-consistent interface'
    for (parameter, value) in parameters.items():
        setattr(self, parameter, value)
    return self
Set the parameters in a sklearn-consistent interface
def set_params(self, **parameters):
    
    for (parameter, value) in parameters.items():
        setattr(self, parameter, value)
    return self