class_docstr: Meta-transformer for adding predictions and/or class probabilities as synthetic feature(s).
  
  Parameters
  ----------
  estimator : object
      The base estimator from which the transformer is built.
docstr: Transform data by adding two synthetic feature(s).
  
  Parameters
  ----------
  X: numpy ndarray, {n_samples, n_components}
      New data, where n_samples is the number of samples and n_components is the number of components.
  
  Returns
  -------
  X_transformed: array-like, shape (n_samples, n_features + 1) or (n_samples, n_features + 1 + n_classes) for classifier with predict_proba attribute
      The transformed feature set.
code: def transform(self, X):
      """Transform data by adding two synthetic feature(s).
  
      Parameters
      ----------
      X: numpy ndarray, {n_samples, n_components}
          New data, where n_samples is the number of samples and n_components is the number of components.
  
      Returns
      -------
      X_transformed: array-like, shape (n_samples, n_features + 1) or (n_samples, n_features + 1 + n_classes) for classifier with predict_proba attribute
          The transformed feature set.
      """
      X = check_array(X)
      X_transformed = np.copy(X)
      # add class probabilities as a synthetic feature
      if is_classifier(self.estimator) and hasattr(
          self.estimator, "predict_proba"
      ):
          y_pred_proba = self.estimator.predict_proba(X)
          # check all values that should be not infinity or not NAN
          if np.all(np.isfinite(y_pred_proba)):
              X_transformed = np.hstack((y_pred_proba, X))
  
      # add class prediction as a synthetic feature
      X_transformed = np.hstack(
          (
              np.reshape(self.estimator.predict(X), (-1, 1)),
              X_transformed,
          )
      )
      return X_transformed
  
file_path: tpot/tpot/builtins/stacking_estimator.py
imports: import numpy
  from sklearn.base import BaseEstimator, TransformerMixin, is_classifier
  from sklearn.utils import check_array
label_desc: Use image node_id 3 for calling the StackingEstimator obj's underlying member method code with example usage: obj.transform(X) and returns: X_transformed