Misc function performing 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.
Functions
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 Group chunks into groups to match desired number of chunks. |
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. |
summary(dataset[, stats, lstats, sstats, ...]) | String summary over the object :Parameters: stats : bool Include some basic statistics (mean, std, var) over dataset samples lstats : ‘auto’ or bool Include statistics on chunks/targets. |
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 :Parameters: table : list of lists of strings What is aimed to be printed out : None or stream Where to print. |
Classes
Dataset(samples[, sa, fa, a]) | Generic storage class for datasets with multiple attributes. |
SequenceStats(seq[, order]) | Simple helper to provide representation of sequence statistics Matlab analog: http://cfn.upenn.edu/aguirre/code/matlablib/mseq/mtest.m WARNING: Experimental – API might change without warning! Current implementation is ugly! .. |