Mapper encapsulating an arbitray MDP node.
This mapper wraps an MDP node and uses it for forward and reverse data mapping (reverse is only available if the underlying MDP node supports it). It is possible to specify arbitrary arguments for all processing steps of an MDP node (training, training stop, execution, and inverse).
Because MDP does not allow to ‘reset’ a node and (re)train it from scratch the mapper uses a copy of the initially wrapped node for the actual processing. Upon subsequent training attempts a new copy of the original node is made and replaces the previous one.
Notes
MDP nodes requiring multiple training phases are not supported. Use a MDPFlowWrapper for that. Moreover, it is not possible to perform incremental training of a node.
Available conditional attributes:
(Conditional attributes enabled by default suffixed with +)
Methods
forward(data) | Map data from input to output space. |
forward1(data) | Wrapper method to map single samples. |
generate(ds) | Yield processing results. |
get_postproc() | Returns the post-processing node or None. |
get_space() | Query the processing space name of this node. |
reset() | |
reverse(data) | Reverse-map data from output back into input space. |
reverse1(data) | Wrapper method to map single samples. |
set_postproc(node) | Assigns a post-processing node |
set_space(name) | Set the processing space name of this node. |
train(ds) | The default implementation calls _pretrain(), _train(), and finally _posttrain(). |
untrain() | Reverts changes in the state of this node caused by previous training |
Parameters : | node : mdp.Node instance
nodeargs : dict
space : see base class enable_ca : None or list of str
disable_ca : None or list of str
auto_train : bool
force_train : bool
pass_attr : str, list of str|tuple, optional
postproc : Node instance, optional
descr : str
|
---|
Methods
forward(data) | Map data from input to output space. |
forward1(data) | Wrapper method to map single samples. |
generate(ds) | Yield processing results. |
get_postproc() | Returns the post-processing node or None. |
get_space() | Query the processing space name of this node. |
reset() | |
reverse(data) | Reverse-map data from output back into input space. |
reverse1(data) | Wrapper method to map single samples. |
set_postproc(node) | Assigns a post-processing node |
set_space(name) | Set the processing space name of this node. |
train(ds) | The default implementation calls _pretrain(), _train(), and finally _posttrain(). |
untrain() | Reverts changes in the state of this node caused by previous training |