class_docstr: Base class for all estimators in scikit-learn
  
  Notes
  -----
  All estimators should specify all the parameters that can be set
  at the class level in their ``__init__`` as explicit keyword
  arguments (no ``*args`` or ``**kwargs``).
class_docstr_tok: ["Base","class","for","all","estimators","in","scikit-learn","Notes","--","--","-","All","estimators","should","specify","all","the","parameters","that","can","be","set","at","the","class","level","in","their","``","__init__","``","as","explicit","keyword","arguments","(","no","``","*","args","``","or","``","*","*","kwargs","``",")","."]
docstr: Set the parameters of this estimator.
  
  The method works on simple estimators as well as on nested objects
  (such as pipelines). The latter have parameters of the form
  ``<component>__<parameter>`` so that it's possible to update each
  component of a nested object.
  
  Returns
  -------
  self
docstr_tok: ["Set","the","parameters","of","this","estimator",".","The","method","works","on","simple","estimators","as","well","as","on","nested","objects","(","such","as","pipelines",")",".","The","latter","have","parameters","of","the","form","``","<","component",">","__","<","parameter",">","``","so","that","it","'s","possible","to","update","each","component","of","a","nested","object",".","Returns","--","--","--","-","self"]
code: def set_params(self, **params):
      """Set the parameters of this estimator.
  
      The method works on simple estimators as well as on nested objects
      (such as pipelines). The latter have parameters of the form
      ``<component>__<parameter>`` so that it's possible to update each
      component of a nested object.
  
      Returns
      -------
      self
      """
      if not params:
          # Simple optimisation to gain speed (inspect is slow)
          return self
      valid_params = self.get_params(deep=True)
      for key, value in six.iteritems(params):
          split = key.split("__", 1)
          if len(split) > 1:
              # nested objects case
              name, sub_name = split
              if name not in valid_params:
                  raise ValueError(
                      "Invalid parameter %s for estimator %s. "
                      "Check the list of available parameters "
                      "with `estimator.get_params().keys()`."
                      % (name, self)
                  )
              sub_object = valid_params[name]
              sub_object.set_params(**{sub_name: value})
          else:
              # simple objects case
              if key not in valid_params:
                  raise ValueError(
                      "Invalid parameter %s for estimator %s. "
                      "Check the list of available parameters "
                      "with `estimator.get_params().keys()`."
                      % (key, self.__class__.__name__)
                  )
              setattr(self, key, value)
      return self
  
imports: import copy
  import warnings
  import numpy
  from scipy import sparse
  from .externals import six
  from .utils.fixes import signature
  from .utils.deprecation import deprecated
  from .exceptions import ChangedBehaviorWarning
  from .None import __version__
label_desc: Use image node_id 3 for calling the BaseEstimator obj's underlying member method code with example usage: obj.set_params() and returns: self, self