mlens.parallel.manager module

ML-Ensemble

author:Sebastian Flennerhag
copyright:2017
licence:MIT

Parallel processing job managers.

class mlens.parallel.manager.BaseProcessor(caller)[source]

Bases: object

Parallel processing base class.

Base class for parallel processing engines.

caller
initialize(job, X, y=None, dir=None)[source]

Create a job instance for estimation.

job
terminate()[source]

Remove temporary folder and all cache data.

class mlens.parallel.manager.Job(job)[source]

Bases: object

Container class for holding job data.

dir
job
predict_in
predict_out
tmp
update()[source]

Shift output array to input array.

y
class mlens.parallel.manager.ParallelEvaluation(caller)[source]

Bases: mlens.parallel.manager.BaseProcessor

Parallel cross-validation engine.

Parameters:caller (Evaluator) – The Evaluator that instantiated the processor.
process(attr)[source]

Fit all layers in the attached LayerContainer.

class mlens.parallel.manager.ParallelProcessing(caller)[source]

Bases: mlens.parallel.manager.BaseProcessor

Parallel processing engine.

Engine for running ensemble estimation.

Parameters:layers (mlens.ensemble.base.LayerContainer) – The LayerContainer that instantiated the processor.
get_preds(dtype=None, order='C')[source]

Return prediction matrix.

Parameters:
  • dtype (numpy dtype object, optional) – data type to return
  • order (str (default = 'C')) – data order. See numpy.asarray for details.
process()[source]

Fit all layers in the attached LayerContainer.

mlens.parallel.manager.dump_array(array, name, dir)[source]

Dump array for memmapping.