Miscellaneous functions to perform operations on datasets.

All the functions defined in this module must accept dataset as the first argument since they are bound to Dataset class in the trailer.

Inheritance diagram of mvpa2.datasets.miscfx


aggregate_features(dataset[, fx]) Apply a function to each row of the samples matrix of a dataset.
coarsen_chunks(source[, nchunks]) Change chunking of the dataset
datasetmethod(func) Decorator to easily bind functions to an AttrDataset class
get_nelements_per_value(data) Returns the number of elements per unique value of some sequence.
get_nsamples_per_attr(dataset, attr) Returns the number of samples per unique value of a sample attribute.
get_samples_by_attr(dataset, attr, values[, ...]) Return indices of samples given a list of attributes
get_samples_per_chunk_target(dataset[, ...]) Returns an array with the number of samples per target in each chunk.
is_sequence_type isSequenceType(a) – Return True if a has a sequence type, False otherwise.
random_samples(dataset, npertarget[, ...]) Create a dataset with a random subset of samples.
remove_invariant_features(dataset) Returns a new dataset with all invariant features removed.
remove_nonfinite_features(dataset) Returns a new dataset with all non-finite (NaN,Inf) features removed
summary(dataset[, stats, lstats, sstats, ...]) String summary over the object
summary_targets(dataset[, targets_attr, ...]) Provide summary statistics over the targets and chunks
table2string(table[, out]) Given list of lists figure out their common widths and print to out


Dataset(samples[, sa, fa, a]) Generic storage class for datasets with multiple attributes.
SequenceStats(seq[, order]) Simple helper to provide representation of sequence statistics