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
  
  adapted from
  https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/base.py
  Author: Gael Varoquaux <gael.varoquaux@normalesup.org>
  License: BSD 3 clause
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
  
      adapted from
      https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/base.py
      Author: Gael Varoquaux <gael.varoquaux@normalesup.org>
      License: BSD 3 clause
  
      """
      if not params:
          # Simple optimization to gain speed (inspect is slow)
          return self
      valid_params = self.get_params(deep=True)
  
      nested_params = defaultdict(dict)  # grouped by prefix
      for key, value in params.items():
          key, delim, sub_key = key.partition("__")
          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)
              )
  
          if delim:
              nested_params[key][sub_key] = value
          else:
              setattr(self, key, value)
              valid_params[key] = value
  
      for key, sub_params in nested_params.items():
          valid_params[key].set_params(**sub_params)
  
      return self
  
file_path: mlxtend/mlxtend/_base/_base_model.py
imports: from collections import defaultdict
  from time import time
label_desc: Use image node_id 5 for calling the _BaseModel obj's underlying member method code with example usage: obj.set_params() and returns: self, self