class_docstr: A Stacking classifier.
  
  Parameters
  ----------
  pool_classifiers : list of classifiers (Default = None)
      The generated_pool of classifiers trained for the corresponding
      classification problem. Each base classifiers should support the method
      "predict" and "predict_proba". If None, then the pool of classifiers
      is a bagging classifier.
  
  meta_classifier : object or None, optional (default=None)
      Classifier model used to aggregate the output of the base classifiers.
      If None, a :class:`LogisticRegression` classifier is used.
  
  random_state : int, RandomState instance or None, optional (default=None)
      If int, random_state is the seed used by the random number generator;
      If RandomState instance, random_state is the random number generator;
      If None, the random number generator is the RandomState instance used
      by `np.random`.
  
  passthrough : bool (default=False)
      When False, only the predictions of estimators will be used as
      training data for the meta-classifier. When True, the
      meta-classifier is trained on the predictions as well as the
      original training data.
  
  n_jobs : int, default=-1
      The number of parallel jobs to run. None means 1 unless in
      a joblib.parallel_backend context. -1 means using all processors.
      Doesn’t affect fit method.
  
  References
  ----------
  Wolpert, David H. "Stacked generalization." Neural networks 5,
  no. 2 (1992): 241-259.
  
  Kuncheva, Ludmila I. Combining pattern classifiers: methods and algorithms.
  John Wiley & Sons, 2004.
class_docstr_tok: ["A","Stacking","classifier",".","Parameters","--","--","--","--","--","pool_classifiers",":","list","of","classifiers","(","Default","=","None",")","The","generated_pool","of","classifiers","trained","for","the","corresponding","classification","problem",".","Each","base","classifiers","should","support","the","method","``","predict","''","and","``","predict_proba","''",".","If","None",",","then","the","pool","of","classifiers","is","a","bagging","classifier",".","meta_classifier",":","object","or","None",",","optional","(","default=None",")","Classifier","model","used","to","aggregate","the","output","of","the","base","classifiers",".","If","None",",","a",":","class",":","`","LogisticRegression","`","classifier","is","used",".","random_state",":","int",",","RandomState","instance","or","None",",","optional","(","default=None",")","If","int",",","random_state","is","the","seed","used","by","the","random","number","generator",";","If","RandomState","instance",",","random_state","is","the","random","number","generator",";","If","None",",","the","random","number","generator","is","the","RandomState","instance","used","by","`","np.random","`",".","passthrough",":","bool","(","default=False",")","When","False",",","only","the","predictions","of","estimators","will","be","used","as","training","data","for","the","meta-classifier",".","When","True",",","the","meta-classifier","is","trained","on","the","predictions","as","well","as","the","original","training","data",".","n_jobs",":","int",",","default=-1","The","number","of","parallel","jobs","to","run",".","None","means","1","unless","in","a","joblib.parallel_backend","context",".","-1","means","using","all","processors",".","Doesn","\u2019","t","affect","fit","method",".","References","--","--","--","--","--","Wolpert",",","David","H.","``","Stacked","generalization",".","''","Neural","networks","5",",","no",".","2","(","1992",")",":","241-259",".","Kuncheva",",","Ludmila","I",".","Combining","pattern","classifiers",":","methods","and","algorithms",".","John","Wiley","&","Sons",",","2004","."]
docstr: Predict the label of each sample in X and returns the predicted
  label.
  
  Parameters
  ----------
  X : array of shape (n_samples, n_features)
      The data to be classified
  
  Returns
  -------
  predicted_labels : array of shape (n_samples)
                     Predicted class for each sample in X.
docstr_tok: ["Predict","the","label","of","each","sample","in","X","and","returns","the","predicted","label",".","Parameters","--","--","--","--","--","X",":","array","of","shape","(","n_samples",",","n_features",")","The","data","to","be","classified","Returns","--","--","--","-","predicted_labels",":","array","of","shape","(","n_samples",")","Predicted","class","for","each","sample","in","X","."]
code: def predict(self, X):
      """Predict the label of each sample in X and returns the predicted
      label.
  
      Parameters
      ----------
      X : array of shape (n_samples, n_features)
          The data to be classified
  
      Returns
      -------
      predicted_labels : array of shape (n_samples)
                         Predicted class for each sample in X.
      """
      check_is_fitted(self, "meta_classifier_")
      X = check_array(X)
      if self.n_features_ != X.shape[1]:
          raise ValueError(
              "Number of features of the model must "
              "match the input. Model n_features is {0} and "
              "input n_features is {1}."
              "".format(self.n_features_, X.shape[1])
          )
  
      base_preds = self._predict_proba_base(X)
      X_meta = self._connect_input(X, base_preds)
      preds = self.meta_classifier_.predict(X_meta)
      return self.classes_.take(preds)
  
file_path: DESlib/deslib/static/stacked.py
imports: import numpy
  from sklearn.linear_model import LogisticRegression
  from sklearn.utils.validation import check_X_y, check_array, check_is_fitted
  from deslib.static.base import BaseStaticEnsemble
label_desc: Use image node_id 3 for calling the StackedClassifier obj's underlying member method code with example usage: obj.predict(X) and returns: self