class_docstr: A stacking classifier.
  
  A stacking classifier is a classifier that uses the predictions of
  several first layer estimators (generated with a cross validation method)
  for a second layer estimator.
  
  Parameters
  ----------
  base_estimators : list, default = [Classifier(strategy="LightGBM"), Classifier(strategy="RandomForest"),Classifier(strategy="ExtraTrees")]
      List of estimators to fit in the first level using a cross validation.
  
  level_estimator : object, default = LogisticRegression()
      The estimator used in second and last level.
  
  n_folds : int, default = 5
      Number of folds used to generate the meta features for the training set
  
  copy : bool, default = False
      If true, meta features are added to the original dataset
  
  drop_first : bool, default = True
      If True, each estimator output n_classes-1 probabilities
  
  random_state : None or int or RandomState. default = 1
      Pseudo-random number generator state used for shuffling. If None, use
      default numpy RNG for shuffling.
  
  verbose : bool, default = True
      Verbose mode.
class_docstr_tok: ["A","stacking","classifier",".","A","stacking","classifier","is","a","classifier","that","uses","the","predictions","of","several","first","layer","estimators","(","generated","with","a","cross","validation","method",")","for","a","second","layer","estimator",".","Parameters","--","--","--","--","--","base_estimators",":","list",",","default","=","[","Classifier","(","strategy=","''","LightGBM","''",")",",","Classifier","(","strategy=","''","RandomForest","''",")",",","Classifier","(","strategy=","''","ExtraTrees","''",")","]","List","of","estimators","to","fit","in","the","first","level","using","a","cross","validation",".","level_estimator",":","object",",","default","=","LogisticRegression","(",")","The","estimator","used","in","second","and","last","level",".","n_folds",":","int",",","default","=","5","Number","of","folds","used","to","generate","the","meta","features","for","the","training","set","copy",":","bool",",","default","=","False","If","true",",","meta","features","are","added","to","the","original","dataset","drop_first",":","bool",",","default","=","True","If","True",",","each","estimator","output","n_classes-1","probabilities","random_state",":","None","or","int","or","RandomState",".","default","=","1","Pseudo-random","number","generator","state","used","for","shuffling",".","If","None",",","use","default","numpy","RNG","for","shuffling",".","verbose",":","bool",",","default","=","True","Verbose","mode","."]
code: def __init__(
      self,
      base_estimators=[
          Classifier(strategy="LightGBM"),
          Classifier(strategy="RandomForest"),
          Classifier(strategy="ExtraTrees"),
      ],
      level_estimator=LogisticRegression(n_jobs=-1),
      n_folds=5,
      copy=False,
      drop_first=True,
      random_state=1,
      verbose=True,
  ):
      self.base_estimators = base_estimators
      if type(self.base_estimators) != list:
          raise ValueError("base_estimators must be a list")
      else:
          for i, est in enumerate(self.base_estimators):
              self.base_estimators[i] = make_copy(est)
  
      self.level_estimator = level_estimator
  
      self.n_folds = n_folds
      if type(self.n_folds) != int:
          raise ValueError("n_folds must be an integer")
  
      self.copy = copy
      if type(self.copy) != bool:
          raise ValueError("copy must be a boolean")
  
      self.drop_first = drop_first
      if type(self.drop_first) != bool:
          raise ValueError("drop_first must be a boolean")
  
      self.random_state = random_state
      if (type(self.random_state) != int) and (
          self.random_state is not None
      ):
          raise ValueError(
              "random_state must be either None or an integer"
          )
  
      self.verbose = verbose
      if type(self.verbose) != bool:
          raise ValueError("verbose must be a boolean")
  
      self.__fitOK = False
      self.__fittransformOK = False
  
file_path: MLBox/mlbox/model/classification/stacking_classifier.py
imports: import numpy
  import pandas
  from sklearn.linear_model import LogisticRegression
  from sklearn.model_selection import StratifiedKFold
  from copy import copy
  from .classifier import Classifier
  import warnings
label_desc: Use image node_id 1 to create a new StackingClassifier object  with example: obj = StackingClassifier(base_estimators, level_estimator, n_folds, copy, drop_first, random_state, verbose)