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.BaseProcessor
Parallel processing engine.
Engine for running ensemble estimation.
Parameters: layers ( mlens.ensemble.base.LayerContainer
) – TheLayerContainer
that instantiated the processor.
-
class
mlens.parallel.
ParallelEvaluation
(caller)[source]¶ Bases:
mlens.parallel.manager.BaseProcessor
Parallel cross-validation engine.
Parameters: caller ( Evaluator
) – TheEvaluator
that instantiated the processor.
-
class
mlens.parallel.
Stacker
(job, layer)[source]¶ Bases:
mlens.parallel.estimation.BaseEstimator
Stacked fit sub-process class.
Class for fitting a Layer using Stacking.
-
class
mlens.parallel.
Blender
(job, layer)[source]¶ Bases:
mlens.parallel.estimation.BaseEstimator
Blended fit sub-process class.
Class for fitting a Layer using Blending.
-
class
mlens.parallel.
SubStacker
(job, layer)[source]¶ Bases:
mlens.parallel.estimation.BaseEstimator
Stacked subset fit sub-process class.
Class for fitting a Layer using Subsemble.
-
class
mlens.parallel.
SingleRun
(job, layer)[source]¶ Bases:
mlens.parallel.estimation.BaseEstimator
Single run fit sub-process class.
Class for fitting a estimators in a layer without any sub-fits.
-
class
mlens.parallel.
Evaluation
(evaluator)[source]¶ Bases:
object
Evaluation engine.
Run a job for an
Evaluator
instance.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:
object
Base class for estimating a layer in parallel.
Estimation class to be used as based for a layer estimation engined that is callable by the
ParallelProcess
job manager.- A subclass must implement a constructor that accepts the following args:
job
: theJob
instance containing relevant datalayer
: theLayer
instance to estimaten
: the position in theLayerContainer
stack of the layer
as well as a
run
method that accepts aParallel
instance.Parameters: layer ( Layer
) – layer to be estimated.