class_docstr: This pipeline extends the sklearn Pipeline to support transformers that change X, y,
  sample_weight, and the number of samples.
  
  It also adds some new options for setting hyper-parameters with callables and in reference to
  other parameters (see examples).
  
  Parameters
  ----------
  steps : list
      List of (name, transform) tuples (implementing fit/transform) that are chained, in the
      order in which they are chained, with the last object an estimator.
  scorer : sklearn scorer object
  memory : currently not implemented
  
  Attributes
  ----------
  N_train : number of training samples - available after calling fit method
  N_test : number of testing samples - available after calling predict, or score methods
  
  Examples
  --------
  
  >>> from seglearn.transform import FeatureRep, SegmentX
  >>> from seglearn.pipe import Pype
  >>> from seglearn.datasets import load_watch
  >>> from sklearn.ensemble import RandomForestClassifier
  >>> from sklearn.preprocessing import StandardScaler
  >>> data = load_watch()
  >>> X = data['X']
  >>> y = data['y']
  >>> pipe = Pype([('segment', SegmentX()),
  >>>              ('features', FeatureRep()),
  >>>              ('scaler', StandardScaler()),
  >>>              ('rf', RandomForestClassifier())])
  >>> pipe.fit(X, y)
  >>> print(pipe.score(X, y))
docstr: Set the parameters of this estimator.
  Valid parameter keys can be listed with ``get_params()``.
  
  Returns
  -------
  self
docstr_tok: ["Set","the","parameters","of","this","estimator",".","Valid","parameter","keys","can","be","listed","with","``","get_params","(",")","``",".","Returns","--","--","--","-","self"]
code: def set_params(self, **params):
      """
      Set the parameters of this estimator.
      Valid parameter keys can be listed with ``get_params()``.
  
      Returns
      -------
      self
      """
      items = self.steps
      names, _ = zip(*items)
  
      keys = list(params.keys())
  
      for name in keys:
          if "__" not in name and name in names:
              # replace an estimator
              self._replace_estimator("steps", name, params.pop(name))
  
          if callable(params[name]):
              # use a callable or function to set parameters
              params[name] = params[name](params)
  
          elif params[name] in keys:
              # set one arg from another
              params[name] = params[params[name]]
  
      BaseEstimator.set_params(self, **params)
      return self
  
imports: import numpy
  from sklearn.base import BaseEstimator
  from sklearn.pipeline import Pipeline
  from .transform import XyTransformerMixin, Segment
  from .util import segmented_prediction_to_series
label_desc: Use image node_id 16 for calling the Pype obj's underlying member method code with example usage: obj.set_params() and returns: self