Package mdp :: Package parallel :: Class FlowTrainCallable
[hide private]
[frames] | no frames]

Class FlowTrainCallable


Implements a single training phase in a flow for a data block.

A FlowNode is used to simplify the forking process and to 
encapsulate the flow.

You can also derive from this class to define your own callable class. 

Instance Methods [hide private]
 
__call__(self, data)
Do the training and return only the trained node.
 
__init__(self, flownode)
Store everything for the training.
 
fork(self)
Return a fork of this callable, e.g.

Inherited from FlowTaskCallable: setup_environment

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__call__(self, data)
(Call operator)

 
Do the training and return only the trained node.

data -- training data block (array or list if additional arguments are
    required)

Overrides: TaskCallable.__call__

__init__(self, flownode)
(Constructor)

 
Store everything for the training.

keyword arguments:
flownode -- FlowNode containing the flow to be trained.

Overrides: object.__init__

fork(self)

 
Return a fork of this callable, e.g. by making a copy.

This method is always used before a callable is actually called, so
instead of the original callable the fork is called. The ensures that
the original callable is preserved when cachin is used. If the callable
is not modified by the call it can simply return itself.  

Overrides: TaskCallable.fork
(inherited documentation)