mlens.parallel package¶
Submodules¶
Module contents¶
ML-ENSEMBLE
| author: | Sebastian Flennerhag |
|---|---|
| copyright: | 2017 |
| licence: | MIT |
-
class
mlens.parallel.ParallelProcessing(caller)[source]¶ Bases:
mlens.parallel.manager.BaseProcessorParallel processing engine.
Engine for running ensemble estimation.
Parameters: layers ( mlens.ensemble.base.LayerContainer) – TheLayerContainerthat instantiated the processor.
-
class
mlens.parallel.ParallelEvaluation(caller)[source]¶ Bases:
mlens.parallel.manager.BaseProcessorParallel cross-validation engine.
Parameters: caller ( Evaluator) – TheEvaluatorthat instantiated the processor.
-
class
mlens.parallel.Stacker(job, layer)[source]¶ Bases:
mlens.parallel.estimation.BaseEstimatorStacked fit sub-process class.
Class for fitting a Layer using Stacking.
-
class
mlens.parallel.Blender(job, layer)[source]¶ Bases:
mlens.parallel.estimation.BaseEstimatorBlended fit sub-process class.
Class for fitting a Layer using Blending.
-
class
mlens.parallel.SubStacker(job, layer)[source]¶ Bases:
mlens.parallel.estimation.BaseEstimatorStacked subset fit sub-process class.
Class for fitting a Layer using Subsemble.
-
class
mlens.parallel.SingleRun(job, layer)[source]¶ Bases:
mlens.parallel.estimation.BaseEstimatorSingle run fit sub-process class.
Class for fitting a estimators in a layer without any sub-fits.
-
class
mlens.parallel.Evaluation(evaluator)[source]¶ Bases:
objectEvaluation engine.
Run a job for an
Evaluatorinstance.Parameters: evaluator ( Evaluator) – Evaluator instance to run job for.-
evaluate(parallel, X, y, dir)[source]¶ cross-validation of estimators.
Parameters: - parallel (
joblib.Parallel) – The instance to use for parallel fitting. - X (array-like of shape [n_samples, n_features]) – Training set to use for estimation. Can be memmaped.
- y (array-like of shape [n_samples, ]) – labels for estimation. Can be memmaped.
- dir (str) – directory of cache to dump fitted transformers before assembly.
- parallel (
-
preprocess(parallel, X, y, dir)[source]¶ Fit preprocessing pipelines.
Fit all preprocessing pipelines in parallel and store as a
preprocessing_attribute on theEvaluator.Parameters: - parallel (
joblib.Parallel) – The instance to use for parallel fitting. - X (array-like of shape [n_samples, n_features]) – Training set to use for estimation. Can be memmaped.
- y (array-like of shape [n_samples, ]) – labels for estimation. Can be memmaped.
- dir (directory of cache to dump fitted transformers before assembly.) –
- parallel (
-
-
class
mlens.parallel.BaseEstimator(layer)[source]¶ Bases:
objectBase class for estimating a layer in parallel.
Estimation class to be used as based for a layer estimation engined that is callable by the
ParallelProcessjob manager.- A subclass must implement a constructor that accepts the following args:
job: theJobinstance containing relevant datalayer: theLayerinstance to estimaten: the position in theLayerContainerstack of the layer
as well as a
runmethod that accepts aParallelinstance.Parameters: layer ( Layer) – layer to be estimated.