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: Apply transforms, and transform with the final estimator
  This also works where final estimator is ``None``: all prior
  transformations are applied.
  
  Parameters
  ----------
  X : iterable
      Data to transform. Must fulfill input requirements of first step
      of the pipeline.
  y : array-like
      Target
  
  Returns
  -------
  Xt : array-like, shape = [n_samples, n_transformed_features]
      Transformed data
  yt : array-like, shape = [n_samples]
      Transformed target
docstr_tok: ["Apply","transforms",",","and","transform","with","the","final","estimator","This","also","works","where","final","estimator","is","``","None","``",":","all","prior","transformations","are","applied",".","Parameters","--","--","--","--","--","X",":","iterable","Data","to","transform",".","Must","fulfill","input","requirements","of","first","step","of","the","pipeline",".","y",":","array-like","Target","Returns","--","--","--","-","Xt",":","array-like",",","shape","=","[","n_samples",",","n_transformed_features","]","Transformed","data","yt",":","array-like",",","shape","=","[","n_samples","]","Transformed","target"]
code: def transform(self, X, y=None):
      """
      Apply transforms, and transform with the final estimator
      This also works where final estimator is ``None``: all prior
      transformations are applied.
  
      Parameters
      ----------
      X : iterable
          Data to transform. Must fulfill input requirements of first step
          of the pipeline.
      y : array-like
          Target
  
      Returns
      -------
      Xt : array-like, shape = [n_samples, n_transformed_features]
          Transformed data
      yt : array-like, shape = [n_samples]
          Transformed target
      """
      Xt, yt, _ = self._transform(X, y)
  
      if isinstance(self._final_estimator, XyTransformerMixin):
          Xt, yt, _ = self._final_estimator.transform(Xt, yt)
      else:
          Xt = self._final_estimator.transform(Xt)
  
      return Xt, yt
  
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 5 for calling the Pype obj's underlying member method code with example usage: obj.transform(X, y) and returns: Xt,  yt