mvpa2.mappers.slicing.Node

Inheritance diagram of Node

class mvpa2.mappers.slicing.Node(space=None, postproc=None, **kwargs)

Common processing object.

A Node is an object the processes datasets. It can be called with a Dataset and returns another dataset with the results. In addition, a node can also be used as a generator. Upon calling generate() with a datasets it yields (potentially) multiple result datasets.

Node have a notion of space. The meaning of this space may vary heavily across sub-classes. 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.

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 +)

Parameters :

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.

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

descr : str

Description of the instance

generate(ds)

Yield processing results.

This methods causes the node to behave like a generator. By default it simply yields a single result of its processing – identical to the output of calling the node with a dataset. Subclasses might implement generators that yield multiple results.

Parameters :

ds: Dataset :

Input dataset

Returns :

generator :

the generator yields the result of the processing.

get_postproc()

Returns the post-processing node or None.

get_space()

Query the processing space name of this node.

postproc

Node to perform post-processing of results

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.

space

Processing space name of this node

NeuroDebian

NITRC-listed