mvpa2.datasets.cosmo.from_any

mvpa2.datasets.cosmo.from_any(x)

Load CoSMoMVPA dataset or neighborhood

Parameters:

x : basestring or dict or Dataset or CosmoQueryEngine

If a basestring it is interpreted as a filename of a .mat file with a CoSMoMVPA dataset or neighborhood struct, and the contents are returned. If a dict it is interpreted as the result from scipy’s loadmat and its contents are returned If a Dataset or CosmoQueryEngine then x is returned immediately

Returns:

y : Dataset or CosmoQueryEngine

If x refers to a Dataset (has .samples) then a Dataset is returned with .fa., .sa and .a taken from the input (if present) If x refers to a CosmoQueryEngine (has .neighbors) then a CosmoQueryEngine is returned.