class_docstr: Meta ensembling, also known as stacking. See
  http://blog.kaggle.com/2016/12/27/a-kagglers-guide-to-model-stacking-in-practice/
  for more information
  
  Parameters
  ----------
  base_estimators: list or numpy array (n_estimators,)
      A list of base classifiers.
  
  meta_clf : object, optional (default=LogisticRegression)
      The meta classifier to make the final prediction.
  
  n_folds : int, optional (default=2)
      The number of splits of the training sample.
  
  keep_original : bool, optional (default=False)
      If True, keep the original features for training and predicting.
  
  use_proba : bool, optional (default=False)
      If True, use the probability prediction as the new features.
  
  shuffle_data : bool, optional (default=False)
      If True, shuffle the input data.
  
  random_state : int, RandomState 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`.
  
  threshold : float in (0, 1), optional (default=None)
      Cut-off value to convert scores into binary labels.
  
  pre_fitted : bool, optional (default=False)
      Whether the base classifiers are trained. If True, `fit`
      process may be skipped.
class_docstr_tok: ["Meta","ensembling",",","also","known","as","stacking",".","See","http",":","\/\/blog.kaggle.com\/2016\/12\/27\/a-kagglers-guide-to-model-stacking-in-practice\/","for","more","information","Parameters","--","--","--","--","--","base_estimators",":","list","or","numpy","array","(","n_estimators",",",")","A","list","of","base","classifiers",".","meta_clf",":","object",",","optional","(","default=LogisticRegression",")","The","meta","classifier","to","make","the","final","prediction",".","n_folds",":","int",",","optional","(","default=2",")","The","number","of","splits","of","the","training","sample",".","keep_original",":","bool",",","optional","(","default=False",")","If","True",",","keep","the","original","features","for","training","and","predicting",".","use_proba",":","bool",",","optional","(","default=False",")","If","True",",","use","the","probability","prediction","as","the","new","features",".","shuffle_data",":","bool",",","optional","(","default=False",")","If","True",",","shuffle","the","input","data",".","random_state",":","int",",","RandomState","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","`",".","threshold",":","float","in","(","0",",","1",")",",","optional","(","default=None",")","Cut-off","value","to","convert","scores","into","binary","labels",".","pre_fitted",":","bool",",","optional","(","default=False",")","Whether","the","base","classifiers","are","trained",".","If","True",",","`","fit","`","process","may","be","skipped","."]
code: def __init__(
      self,
      base_estimators,
      meta_clf=None,
      n_folds=2,
      keep_original=True,
      use_proba=False,
      shuffle_data=False,
      random_state=None,
      threshold=None,
      pre_fitted=None,
  ):
      super(Stacking, self).__init__(
          base_estimators=base_estimators, pre_fitted=pre_fitted
      )
  
      # validate input parameters
      if not isinstance(n_folds, int):
          raise ValueError("n_folds must be an integer variable")
      check_parameter(
          n_folds, low=2, include_left=True, param_name="n_folds"
      )
      self.n_folds = n_folds
  
      if meta_clf is not None:
          self.meta_clf = meta_clf
      else:
          self.meta_clf = LogisticRegression()
  
      # set flags
      self.keep_original = keep_original
      self.use_proba = use_proba
      self.shuffle_data = shuffle_data
  
      self.random_state = random_state
  
      if threshold is not None:
          warnings.warn(
              "Stacking does not support threshold setting option. "
              "Please set the threshold in classifiers directly."
          )
  
      if pre_fitted is not None:
          warnings.warn("Stacking does not support pre_fitted option.")
  
file_path: combo/combo/models/classifier_stacking.py
imports: import warnings
  import numpy
  from sklearn.linear_model import LogisticRegression
  from sklearn.utils import shuffle
  from sklearn.utils import check_random_state
  from sklearn.utils import check_array
  from sklearn.utils import check_X_y
  from sklearn.utils.validation import check_is_fitted
  from pyod.utils.utility import check_parameter
  from ..utils.utility import list_diff
  from .base import BaseAggregator
label_desc: Use image node_id 1 to create a new Stacking object from inherited base classes: BaseAggregator with example: obj = Stacking(base_estimators, meta_clf, n_folds, keep_original, use_proba, shuffle_data, random_state, threshold, pre_fitted)