class_docstr: Mixin to make a mlens ensemble behave as Scikit-learn estimator.
  
  Scikit-learn expects an estimator to be fully initialized when
  instantiated, but an ML-Ensemble estimator requires layers to be
  initialized before calling ``fit`` or ``predict`` makes sense.
  
  ``InitMixin`` is intended to be used to create temporary test classes
  of proper mlens ensemble classes that are identical to the parent class
  except that ``__init__`` will also initialize one layer with one
  estimator, and if applicable one meta estimator.
  
  The layer estimator and the meta estimator are both the dummy
  ``AverageRegressor`` class to minimize complexity and avoids raising
  errors due to the estimators in the layers.
  
  To create a testing class, modify the ``__init__`` of the test class
  to call ``super().__init__`` as in the example below.
  
  Examples
  --------
  
  Assert the :class:`SuperLearner` passes the Scikit-learn estimator test
  
  >>> from sklearn.utils.estimator_checks import check_estimator
  >>> from mlens.ensemble import SuperLearner
  >>> from mlens.testing.dummy import InitMixin
  >>>
  >>> class TestSuperLearner(InitMixin, SuperLearner):
  ...
  ...     def __init__(self):
  ...         super(TestSuperLearner, self).__init__()
  >>>
  >>> check_estimator(TestSuperLearner)
class_docstr_tok: ["Mixin","to","make","a","mlens","ensemble","behave","as","Scikit-learn","estimator",".","Scikit-learn","expects","an","estimator","to","be","fully","initialized","when","instantiated",",","but","an","ML-Ensemble","estimator","requires","layers","to","be","initialized","before","calling","``","fit","``","or","``","predict","``","makes","sense",".","``","InitMixin","``","is","intended","to","be","used","to","create","temporary","test","classes","of","proper","mlens","ensemble","classes","that","are","identical","to","the","parent","class","except","that","``","__init__","``","will","also","initialize","one","layer","with","one","estimator",",","and","if","applicable","one","meta","estimator",".","The","layer","estimator","and","the","meta","estimator","are","both","the","dummy","``","AverageRegressor","``","class","to","minimize","complexity","and","avoids","raising","errors","due","to","the","estimators","in","the","layers",".","To","create","a","testing","class",",","modify","the","``","__init__","``","of","the","test","class","to","call","``","super","(",")",".__init__","``","as","in","the","example","below",".","Examples","--","--","--","--","Assert","the",":","class",":","`","SuperLearner","`","passes","the","Scikit-learn","estimator","test",">",">",">","from","sklearn.utils.estimator_checks","import","check_estimator",">",">",">","from","mlens.ensemble","import","SuperLearner",">",">",">","from","mlens.testing.dummy","import","InitMixin",">",">",">",">",">",">","class","TestSuperLearner","(","InitMixin",",","SuperLearner",")",":","...","...","def","__init__","(","self",")",":","...","super","(","TestSuperLearner",",","self",")",".__init__","(",")",">",">",">",">",">",">","check_estimator","(","TestSuperLearner",")"]
code: def __init__(self):
      # Instantiate class
      super(InitMixin, self).__init__()
  
      # The test is parallelized and Scikit-learn estimators default to
      # n_jobs = 1, so need to coerce ensembles to the same behavior
      self.n_jobs = 1
  
      # Build an ensemble consisting of two OLS estimators in the first
      # layer, and a single on top.
      getattr(self, "add")([OLS(offset=1), OLS(offset=2)])
      getattr(self, "add_meta")(OLS())
  
imports: from __future__ import division, print_function, with_statement
  import os
  import shutil
  import warnings
  from abc import abstractmethod
  import numpy
  from ..utils.utils import pickle_save, pickle_load
  from ..utils.dummy import OLS, LogisticRegression, Scale
  from ..externals.sklearn.base import clone
  from ..index import INDEXERS
  from ..ensemble.base import Sequential
  from ..estimators import LayerEnsemble
  from ..parallel import ParallelProcessing, Learner, Transformer, Layer, make_group, Pipeline
label_desc: Use image node_id 1 to create a new InitMixin object from inherited base classes: object with example: obj = InitMixin()