mvpa2.featsel.base.vstack

mvpa2.featsel.base.vstack(datasets, a=None, fa='drop_nonunique')

Stacks datasets vertically (appending samples).

All datasets must have an identical set of sample attributes (matching keys, not values), otherwise a ValueError will be raised. See a argument documentation for transferring dataset attributes, and fa argument for feature attributes – by default feature attributes which differ in any input dataset from the others would be dropped.

Parameters:

datasets : tuple

Sequence of datasets to be stacked.

a: {‘unique’,’drop_nonunique’,’uniques’,’all’} or True or False or None (default: None)

Indicates which dataset attributes from datasets are stored in merged_dataset. If an int k, then the dataset attributes from datasets[k] are taken. If ‘unique’ then it is assumed that any attribute common to more than one dataset in datasets is unique; if not an exception is raised. If ‘drop_nonunique’ then as ‘unique’, except that exceptions are not raised. If ‘uniques’ then, for each attribute, any unique value across the datasets is stored in a tuple in merged_datasets. If ‘all’ then each attribute present in any dataset across datasets is stored as a tuple in merged_datasets; missing values are replaced by None. If None (the default) then no attributes are stored in merged_dataset. True is equivalent to ‘drop_nonunique’. False is equivalent to None.

fa: {‘update’, ‘drop_nonunique’}, (default: ‘drop_nonunique’)

Indicate which feature attributes are stored in merged dataset. If ‘update’ - attributes are updated while growing the dataset. If ‘drop_nonunique’, attribute would be dropped from the dataset if its value differs across datasets for any feature.

Returns:

AttrDataset (or respective subclass)