mvpa2.misc.io.base.SampleAttributes¶

-
class
mvpa2.misc.io.base.
SampleAttributes
(source, literallabels=True, header=None)¶ Read and write PyMVPA sample attribute definitions from and to text files.
Attributes
ncolumns
Returns the number of columns. nrows
Returns the number of rows. nsamples
Returns the number of samples in the file. Methods
clear
()copy
()fromkeys
(S[,v])v defaults to None. get
(k[,d])has_key
(k)items
()iteritems
()iterkeys
()itervalues
()keys
()pop
(k[,d])If key is not found, d is returned if given, otherwise KeyError is raised popitem
()2-tuple; but raise KeyError if D is empty. select_samples
(selection)Return new ColumnData with selected samples setdefault
(k[,d])tofile
(filename)Write sample attributes to a text file. update
([E, ]**F)If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k] values
()viewitems
()viewkeys
()viewvalues
()Read PyMVPA sample attributes from disk.
Parameters: source : str
Filename of an atrribute file
literallabels : bool, optional
Either labels are given as literal strings
header : None or bool or list of str
If None, [‘targets’, ‘chunks’] is assumed. Otherwise the same behavior as of
ColumnData
Attributes
ncolumns
Returns the number of columns. nrows
Returns the number of rows. nsamples
Returns the number of samples in the file. Methods
clear
()copy
()fromkeys
(S[,v])v defaults to None. get
(k[,d])has_key
(k)items
()iteritems
()iterkeys
()itervalues
()keys
()pop
(k[,d])If key is not found, d is returned if given, otherwise KeyError is raised popitem
()2-tuple; but raise KeyError if D is empty. select_samples
(selection)Return new ColumnData with selected samples setdefault
(k[,d])tofile
(filename)Write sample attributes to a text file. update
([E, ]**F)If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k] values
()viewitems
()viewkeys
()viewvalues
()-
nsamples
¶ Returns the number of samples in the file.
-
tofile
(filename)¶ Write sample attributes to a text file.
-