class_docstr: A Stacking classifier for scikit-learn estimators for classification.
  
  Parameters
  ----------
  classifiers : array-like, shape = [n_classifiers]
      A list of classifiers.
      Invoking the `fit` method on the `StackingClassifer` will fit clones
      of these original classifiers that will
      be stored in the class attribute
      `self.clfs_` if `use_clones=True` (default) and
      `fit_base_estimators=True` (default).
  meta_classifier : object
      The meta-classifier to be fitted on the ensemble of
      classifiers
  use_probas : bool (default: False)
      If True, trains meta-classifier based on predicted probabilities
      instead of class labels.
  drop_proba_col : string (default: None)
      Drops extra "probability" column in the feature set, because it is
      redundant:
      p(y_c) = 1 - p(y_1) + p(y_2) + ... + p(y_{c-1}).
      This can be useful for meta-classifiers that are sensitive to perfectly
      collinear features.
      If 'last', drops last probability column.
      If 'first', drops first probability column.
      Only relevant if `use_probas=True`.
  average_probas : bool (default: False)
      Averages the probabilities as meta features if `True`.
      Only relevant if `use_probas=True`.
  verbose : int, optional (default=0)
      Controls the verbosity of the building process.
      - `verbose=0` (default): Prints nothing
      - `verbose=1`: Prints the number & name of the regressor being fitted
      - `verbose=2`: Prints info about the parameters of the
                     regressor being fitted
      - `verbose>2`: Changes `verbose` param of the underlying regressor to
         self.verbose - 2
  use_features_in_secondary : bool (default: False)
      If True, the meta-classifier will be trained both on the predictions
      of the original classifiers and the original dataset.
      If False, the meta-classifier will be trained only on the predictions
      of the original classifiers.
  store_train_meta_features : bool (default: False)
      If True, the meta-features computed from the training data used
      for fitting the meta-classifier stored in the
      `self.train_meta_features_` array, which can be
      accessed after calling `fit`.
  use_clones : bool (default: True)
      Clones the classifiers for stacking classification if True (default)
      or else uses the original ones, which will be refitted on the dataset
      upon calling the `fit` method. Hence, if use_clones=True, the original
      input classifiers will remain unmodified upon using the
      StackingClassifier's `fit` method.
      Setting `use_clones=False` is
      recommended if you are working with estimators that are supporting
      the scikit-learn fit/predict API interface but are not compatible
      to scikit-learn's `clone` function.
  fit_base_estimators: bool (default: True)
      Refits classifiers in `classifiers` if True; uses references to the
      `classifiers`, otherwise (assumes that the classifiers were
      already fit).
      Note: fit_base_estimators=False will enforce use_clones to be False,
      and is incompatible to most scikit-learn wrappers!
      For instance, if any form of cross-validation is performed
      this would require the re-fitting classifiers to training folds, which
      would raise a NotFitterError if fit_base_estimators=False.
      (New in mlxtend v0.6.)
  
  Attributes
  ----------
  clfs_ : list, shape=[n_classifiers]
      Fitted classifiers (clones of the original classifiers)
  meta_clf_ : estimator
      Fitted meta-classifier (clone of the original meta-estimator)
  train_meta_features : numpy array, shape = [n_samples, n_classifiers]
      meta-features for training data, where n_samples is the
      number of samples
      in training data and n_classifiers is the number of classfiers.
  
  Examples
  -----------
  For usage examples, please see
  https://rasbt.github.io/mlxtend/user_guide/classifier/StackingClassifier/
class_docstr_tok: ["A","Stacking","classifier","for","scikit-learn","estimators","for","classification",".","Parameters","--","--","--","--","--","classifiers",":","array-like",",","shape","=","[","n_classifiers","]","A","list","of","classifiers",".","Invoking","the","`","fit","`","method","on","the","`","StackingClassifer","`","will","fit","clones","of","these","original","classifiers","that","will","be","stored","in","the","class","attribute","`","self.clfs_","`","if","`","use_clones=True","`","(","default",")","and","`","fit_base_estimators=True","`","(","default",")",".","meta_classifier",":","object","The","meta-classifier","to","be","fitted","on","the","ensemble","of","classifiers","use_probas",":","bool","(","default",":","False",")","If","True",",","trains","meta-classifier","based","on","predicted","probabilities","instead","of","class","labels",".","drop_proba_col",":","string","(","default",":","None",")","Drops","extra","``","probability","''","column","in","the","feature","set",",","because","it","is","redundant",":","p","(","y_c",")","=","1","-","p","(","y_1",")","+","p","(","y_2",")","+","...","+","p","(","y_","{","c-1","}",")",".","This","can","be","useful","for","meta-classifiers","that","are","sensitive","to","perfectly","collinear","features",".","If","'last","'",",","drops","last","probability","column",".","If","'first","'",",","drops","first","probability","column",".","Only","relevant","if","`","use_probas=True","`",".","average_probas",":","bool","(","default",":","False",")","Averages","the","probabilities","as","meta","features","if","`","True","`",".","Only","relevant","if","`","use_probas=True","`",".","verbose",":","int",",","optional","(","default=0",")","Controls","the","verbosity","of","the","building","process",".","-","`","verbose=0","`","(","default",")",":","Prints","nothing","-","`","verbose=1","`",":","Prints","the","number","&","name","of","the","regressor","being","fitted","-","`","verbose=2","`",":","Prints","info","about","the","parameters","of","the","regressor","being","fitted","-","`","verbose",">","2","`",":","Changes","`","verbose","`","param","of","the","underlying","regressor","to","self.verbose","-","2","use_features_in_secondary",":","bool","(","default",":","False",")","If","True",",","the","meta-classifier","will","be","trained","both","on","the","predictions","of","the","original","classifiers","and","the","original","dataset",".","If","False",",","the","meta-classifier","will","be","trained","only","on","the","predictions","of","the","original","classifiers",".","store_train_meta_features",":","bool","(","default",":","False",")","If","True",",","the","meta-features","computed","from","the","training","data","used","for","fitting","the","meta-classifier","stored","in","the","`","self.train_meta_features_","`","array",",","which","can","be","accessed","after","calling","`","fit","`",".","use_clones",":","bool","(","default",":","True",")","Clones","the","classifiers","for","stacking","classification","if","True","(","default",")","or","else","uses","the","original","ones",",","which","will","be","refitted","on","the","dataset","upon","calling","the","`","fit","`","method",".","Hence",",","if","use_clones=True",",","the","original","input","classifiers","will","remain","unmodified","upon","using","the","StackingClassifier","'s","`","fit","`","method",".","Setting","`","use_clones=False","`","is","recommended","if","you","are","working","with","estimators","that","are","supporting","the","scikit-learn","fit\/predict","API","interface","but","are","not","compatible","to","scikit-learn","'s","`","clone","`","function",".","fit_base_estimators",":","bool","(","default",":","True",")","Refits","classifiers","in","`","classifiers","`","if","True",";","uses","references","to","the","`","classifiers","`",",","otherwise","(","assumes","that","the","classifiers","were","already","fit",")",".","Note",":","fit_base_estimators=False","will","enforce","use_clones","to","be","False",",","and","is","incompatible","to","most","scikit-learn","wrappers","!","For","instance",",","if","any","form","of","cross-validation","is","performed","this","would","require","the","re-fitting","classifiers","to","training","folds",",","which","would","raise","a","NotFitterError","if","fit_base_estimators=False",".","(","New","in","mlxtend","v0.6",".",")","Attributes","--","--","--","--","--","clfs_",":","list",",","shape=","[","n_classifiers","]","Fitted","classifiers","(","clones","of","the","original","classifiers",")","meta_clf_",":","estimator","Fitted","meta-classifier","(","clone","of","the","original","meta-estimator",")","train_meta_features",":","numpy","array",",","shape","=","[","n_samples",",","n_classifiers","]","meta-features","for","training","data",",","where","n_samples","is","the","number","of","samples","in","training","data","and","n_classifiers","is","the","number","of","classfiers",".","Examples","--","--","--","--","--","-","For","usage","examples",",","please","see","https",":","\/\/rasbt.github.io\/mlxtend\/user_guide\/classifier\/StackingClassifier\/"]
docstr: Get meta-features of test-data.
  
  Parameters
  ----------
  X : numpy array, shape = [n_samples, n_features]
      Test vectors, where n_samples is the number of samples and
      n_features is the number of features.
  
  Returns
  -------
  meta-features : numpy array, shape = [n_samples, n_classifiers]
      Returns the meta-features for test data.
docstr_tok: ["Get","meta-features","of","test-data",".","Parameters","--","--","--","--","--","X",":","numpy","array",",","shape","=","[","n_samples",",","n_features","]","Test","vectors",",","where","n_samples","is","the","number","of","samples","and","n_features","is","the","number","of","features",".","Returns","--","--","--","-","meta-features",":","numpy","array",",","shape","=","[","n_samples",",","n_classifiers","]","Returns","the","meta-features","for","test","data","."]
code: def predict_meta_features(self, X):
      """Get meta-features of test-data.
  
      Parameters
      ----------
      X : numpy array, shape = [n_samples, n_features]
          Test vectors, where n_samples is the number of samples and
          n_features is the number of features.
  
      Returns
      -------
      meta-features : numpy array, shape = [n_samples, n_classifiers]
          Returns the meta-features for test data.
  
      """
      check_is_fitted(self, "clfs_")
      if self.use_probas:
          if self.drop_proba_col == "last":
              probas = np.asarray(
                  [clf.predict_proba(X)[:, :-1] for clf in self.clfs_]
              )
          elif self.drop_proba_col == "first":
              probas = np.asarray(
                  [clf.predict_proba(X)[:, 1:] for clf in self.clfs_]
              )
          else:
              probas = np.asarray(
                  [clf.predict_proba(X) for clf in self.clfs_]
              )
          if self.average_probas:
              vals = np.average(probas, axis=0)
          else:
              vals = np.concatenate(probas, axis=1)
      else:
          vals = np.column_stack([clf.predict(X) for clf in self.clfs_])
      return vals
  
file_path: mlxtend/mlxtend/classifier/stacking_classification.py
imports: import warnings
  import numpy
  from scipy import sparse
  from sklearn.base import TransformerMixin, clone
  from ..externals.estimator_checks import check_is_fitted
  from ..externals.name_estimators import _name_estimators
  from ..utils.base_compostion import _BaseXComposition
  from ._base_classification import _BaseStackingClassifier
label_desc: Use image node_id 6 for calling the StackingClassifier obj's underlying member method code with example usage: obj.predict_meta_features(X) and returns: vals