class_docstr: BaseEnsemble class.
  
  Core ensemble class methods used to add ensemble layers and manipulate
  parameters.
  
  Parameters
  ----------
  model_selection: bool (default=False)
      Whether to use the ensemble in model selection mode. If ``True``,
      this will alter the ``transform`` method. When calling ``transform``
      on new data, the ensemble will call ``predict``, while calling
      ``transform`` with the training data reproduces predictions from the
      ``fit`` call. Hence the ensemble can be used as a pure transformer
      in a preprocessing pipeline passed to the :class:`Evaluator`, as
      training folds are faithfully reproduced as during a ``fit``call and
      test folds are transformed with the ``predict`` method.
  
  samples_size: int (default=20)
      size of training set sample
      (``[min(sample_size, X.size[0]), min(X.size[1], sample_size)]``
  
  shuffle: bool (default=False)
      whether to shuffle input data during fit calls
  
  random_state: bool (default=False)
      random seed.
  
  scorer: obj, optional
      scorer function
  
  verbose: bool, optional
      verbosity
  
  samples_size: int (default=20)
      size of training set sample
      (``[min(sample_size, X.size[0]), min(X.size[1], sample_size)]``
class_docstr_tok: ["BaseEnsemble","class",".","Core","ensemble","class","methods","used","to","add","ensemble","layers","and","manipulate","parameters",".","Parameters","--","--","--","--","--","model_selection",":","bool","(","default=False",")","Whether","to","use","the","ensemble","in","model","selection","mode",".","If","``","True","``",",","this","will","alter","the","``","transform","``","method",".","When","calling","``","transform","``","on","new","data",",","the","ensemble","will","call","``","predict","``",",","while","calling","``","transform","``","with","the","training","data","reproduces","predictions","from","the","``","fit","``","call",".","Hence","the","ensemble","can","be","used","as","a","pure","transformer","in","a","preprocessing","pipeline","passed","to","the",":","class",":","`","Evaluator","`",",","as","training","folds","are","faithfully","reproduced","as","during","a","``","fit","``","call","and","test","folds","are","transformed","with","the","``","predict","``","method",".","samples_size",":","int","(","default=20",")","size","of","training","set","sample","(","``","[","min","(","sample_size",",","X.size","[","0","]",")",",","min","(","X.size","[","1","]",",","sample_size",")","]","``","shuffle",":","bool","(","default=False",")","whether","to","shuffle","input","data","during","fit","calls","random_state",":","bool","(","default=False",")","random","seed",".","scorer",":","obj",",","optional","scorer","function","verbose",":","bool",",","optional","verbosity","samples_size",":","int","(","default=20",")","size","of","training","set","sample","(","``","[","min","(","sample_size",",","X.size","[","0","]",")",",","min","(","X.size","[","1","]",",","sample_size",")","]","``"]
docstr: Build a layer from estimators and preprocessing pipelines
docstr_tok: ["Build","a","layer","from","estimators","and","preprocessing","pipelines"]
code: def _build_layer(self, estimators, indexer, preprocessing, **kwargs):
      """Build a layer from estimators and preprocessing pipelines"""
      # --- check args ---
  
      # Arguments that cannot be very between layers
      check_kwargs(kwargs, ["backend", "n_jobs"])
  
      # Pop layer kwargs and override Sequential args
      verbose = kwargs.pop("verbose", max(self._backend.verbose - 1, 0))
      dtype = kwargs.pop("dtype", self._backend.dtype)
      propagate = kwargs.pop("propagate_features", None)
      shuffle = kwargs.pop("shuffle", self.shuffle)
      random_state = kwargs.pop("random_state", self.random_state)
      rs = kwargs.pop("raise_on_exception", self.raise_on_exception)
      if random_state:
          random_state = check_random_state(random_state).randint(
              0, 10000
          )
  
      # Set learner kwargs
      kwargs["verbose"] = max(verbose - 1, 0)
      kwargs["scorer"] = kwargs.pop("scorer", self.scorer)
  
      # Check estimator and preprocessing formatting
      group = make_group(indexer, estimators, preprocessing, kwargs)
  
      # --- layer ---
      name = "layer-%i" % (
          len(self._backend.stack) + 1
      )  # Start count at 1
      lyr = Layer(
          name=name,
          dtype=dtype,
          shuffle=shuffle,
          random_state=random_state,
          verbose=verbose,
          raise_on_exception=rs,
          propagate_features=propagate,
      )
      lyr.push(group)
      return lyr
  
imports: from __future__ import division, print_function, with_statement
  from abc import ABCMeta, abstractmethod
  import warnings
  from ..None import config
  from ..parallel import Layer, ParallelProcessing, make_group
  from ..parallel.base import BaseStacker
  from ..externals.sklearn.validation import check_random_state
  from ..utils import check_ensemble_build, print_time, safe_print, IdTrain, format_name
  from ..utils.exceptions import LayerSpecificationWarning, NotFittedError, NotInitializedError
  from ..metrics import Data
  from ..externals.sklearn.base import BaseEstimator, clone
label_desc: Use image node_id 10 for calling the BaseEnsemble obj's underlying member method code with example usage: obj._build_layer(estimators, indexer, preprocessing) and returns: lyr