mvpa2.base.node.ChainNode

Inheritance diagram of ChainNode

class mvpa2.base.node.ChainNode(nodes, **kwargs)

Chain of nodes.

This class allows to concatenate a list of nodes into a processing chain. When called with a dataset, it is sequentially fed through a nodes in the chain. A ChainNode may also be used as a generator. In this case, all nodes in the chain are treated as generators too, and the ChainNode behaves as a single big generator that recursively calls all embedded generators and yield the results.

A ChainNode behaves similar to a list container: Nodes can be appended, and the chain can be sliced like a list, etc ...

Notes

Available conditional attributes:

  • calling_time+: Time (in seconds) it took to call the node
  • raw_results: Computed results before invoking postproc. Stored only if postproc is not None.

(Conditional attributes enabled by default suffixed with +)

Methods

append(node) Append a node to the chain.
generate(ds[, startnode])
Parameters:
get_postproc() Returns the post-processing node or None.
get_space() Query the processing space name of this node.
reset()
set_postproc(node) Assigns a post-processing node Set to None to disable postprocessing.
set_space(name) Set the processing space name of this node.
Parameters:

nodes: list :

Node instances.

enable_ca : None or list of str

Names of the conditional attributes which should be enabled in addition to the default ones

disable_ca : None or list of str

Names of the conditional attributes which should be disabled

space: str, optional :

Name of the ‘processing space’. The actual meaning of this argument heavily depends on the sub-class implementation. In general, this is a trigger that tells the node to compute and store information about the input data that is “interesting” in the context of the corresponding processing in the output dataset.

postproc : Node instance, optional

Node to perform post-processing of results. This node is applied in __call__() to perform a final processing step on the to be result dataset. If None, nothing is done.

descr : str

Description of the instance

Methods

append(node) Append a node to the chain.
generate(ds[, startnode])
Parameters:
get_postproc() Returns the post-processing node or None.
get_space() Query the processing space name of this node.
reset()
set_postproc(node) Assigns a post-processing node Set to None to disable postprocessing.
set_space(name) Set the processing space name of this node.
append(node)

Append a node to the chain.

generate(ds, startnode=0)
Parameters:

ds: Dataset :

To be processed dataset

startnode: int :

First node in the chain that shall be considered. This argument is mostly useful for internal optimization.

nodes

NeuroDebian

NITRC-listed