Package mvpa :: Package datasets :: Module misc
[hide private]
[frames] | no frames]

Module misc

source code

Misc function performing operations on datasets.

TODO: shouldn't it be gone under mvpa.misc.signal? or may be smth like mvpa.misc.stats? Or may be we should have mvpa.processing to store this bastards?

Functions [hide private]
 
zscore(dataset, mean=None, std=None, perchunk=True, baselinelabels=None, targetdtype='float64')
Z-Score the samples of a Dataset (in-place).
source code
 
aggregateFeatures(dataset, fx)
Apply a function to each row of the samples matrix of a dataset.
source code

Imports: N, Set, Dataset


Function Details [hide private]

zscore(dataset, mean=None, std=None, perchunk=True, baselinelabels=None, targetdtype='float64')

source code 

Z-Score the samples of a Dataset (in-place).

mean and std can be used to pass custom values to the z-scoring. Both may be scalars or arrays.

All computations are done in place. Data upcasting is done automatically if necessary into targetdtype

If baselinelabels provided, and mean or std aren't provided, it would compute the corresponding measure based only on labels in baselinelabels

If perchunk is True samples within the same chunk are z-scored independent of samples from other chunks, e.i. mean and standard deviation are calculated individually.

aggregateFeatures(dataset, fx)

source code 

Apply a function to each row of the samples matrix of a dataset.

The functor given as fx has to honour an axis keyword argument in the way that NumPy used it (e.g. NumPy.mean, var).

Returns a new Dataset object with the aggregated feature(s).