mvpa2.featsel.base.split_by_sample_attribute

mvpa2.featsel.base.split_by_sample_attribute(ds, sa_label, raise_unequal_count=True)

Splits a dataset based on unique values of a sample attribute

Parameters:

d: Dataset :

input dataset

sa_label: str or list of str :

sample attribute label(s) on which the split is based

Returns:

ds: list of Dataset :

List with n datasets, if d.sa[sa_label] has n unique values