Generator node to partition a dataset.
Partitioning is done by adding a sample attribute that assigns samples to an arbitrary number of partitions. Subclasses offer a variety of partitioning technique that are useful in e.g. cross-validation procedures.
it is important to note that other than adding a new sample attribute input datasets are not modified. In particular, there is no splitting of datasets into multiple pieces. If this is desired, a Partitioner can be chained to a Splitter node to achieve this.
Notes
Available conditional attributes:
(Conditional attributes enabled by default suffixed with +)
Methods
generate(ds) | |
get_partition_specs(ds) | Returns the specs for all to be generated partition sets. |
get_partitions_attr(ds, specs) | Create a partition attribute array for a particular partion spec. |
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_space(name) | Set the processing space name of this node. |
Parameters : | count : None or int
selection_strategy : str
attr : str
space : str
enable_ca : None or list of str
disable_ca : None or list of str
postproc : Node instance, optional
descr : str
|
---|
Methods
generate(ds) | |
get_partition_specs(ds) | Returns the specs for all to be generated partition sets. |
get_partitions_attr(ds, specs) | Create a partition attribute array for a particular partion spec. |
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_space(name) | Set the processing space name of this node. |
Returns the specs for all to be generated partition sets.
Returns : | list(lists) : |
---|
Create a partition attribute array for a particular partion spec.
Parameters : | ds : Dataset
specs : sequence of sequences
|
---|---|
Returns : | array(ints) :
|
DEPRECATED: to be removed in PyMVPA 2.1; use .attr instead