code: def _set_hyperparameters(self, parameters):
          
          for name, value in parameters.iteritems():
              try:
                  getattr(self, name)
              except AttributeError:
                  raise ValueError(
                      'Each parameter in parameters must be an attribute. '
                      '{} is not.'.format(name))
              setattr(self, name, value)
docs: Set internal optimization parameters.