mvpa2.mappers.detrend.poly_detrend

mvpa2.mappers.detrend.poly_detrend(ds, **kwargs)

In-place polynomial detrending.

This function behaves identical to the PolyDetrendMapper. The only difference is that the actual detrending is done in-place – potentially causing a significant reduction of the memory demands.

Parameters :

ds : Dataset

The dataset that will be detrended in-place.

polyord : int or list, optional

Order of the Legendre polynomial to remove from the data. This will remove every polynomial up to and including the provided value. For example, 3 will remove 0th, 1st, 2nd, and 3rd order polynomials from the data. np.B.: The 0th polynomial is the baseline shift, the 1st is the linear trend. If you specify a single int and chunks_attr is not None, then this value is used for each chunk. You can also specify a different polyord value for each chunk by providing a list or ndarray of polyord values the length of the number of chunks.

chunks_attr : str or None

If None, the whole dataset is detrended at once. Otherwise, the given samples attribute (given by its name) is used to define chunks of the dataset that are processed individually. In that case, all the samples within a chunk should be in contiguous order and the chunks should be sorted in order from low to high – unless the dataset provides information about the coordinate of each sample in the space that should be spanned be the polynomials (see inspace argument).

opt_regs : list or None

Optional list of sample attribute names that should be used as additional regressors. One example would be to regress out motion parameters.

space : str or None

If not None, a samples attribute of the same name is added to the mapped dataset that stores the coordinates of each sample in the space that is spanned by the polynomials. If an attribute of that name is already present in the input dataset its values are interpreted as sample coordinates in the space that should be spanned by the polynomials.

enable_ca : None or list of str

Names of the conditional attributes which should be enabled in addition to the default ones

disable_ca : None or list of str

Names of the conditional attributes which should be disabled

auto_train : bool

Flag whether the learner will automatically train itself on the input dataset when called untrained.

force_train : bool

Flag whether the learner will enforce training on the input dataset upon every call.

postproc : Node instance, optional

Node to perform post-processing of results. This node is applied in __call__() to perform a final processing step on the to be result dataset. If None, nothing is done.

descr : str

Description of the instance

NeuroDebian

NITRC-listed