rescale¶
- rescale(data: ndarray, basedata: ndarray, mode: str = 'mean', copy: bool = False, axis: tuple[int] | int = -1) ndarray[source][source]¶
- rescale(line: BaseEpochs, baseline: BaseEpochs, mode: str = 'mean', copy: bool = False, picks: list = 'data', verbose=None) Epochs
- rescale(line: EpochsTFR, baseline: EpochsTFR, mode: str = 'mean', copy: bool = False, picks: list = 'data', verbose=None) Epochs
- rescale(line: AverageTFR, baseline: AverageTFR, mode: str = 'mean', copy: bool = False, picks: list = 'data', verbose=None) Epochs
Rescale (baseline correct) data.
Implement a variety of baseline correction methods. The data is modified in place by default.
- Parameters:
data (
array | mne.Epochs | mne.EpochsTFR) – It can be of any shape. The only constraint is that the last dimension should be time.basedata (
array) – It can be of any shape. The last dimension should be time, and the other dimensions should be the same as data.mode (
'mean'|'ratio'|'logratio'|'percent'|'zscore'|'zlogratio', default'mean', optional) – Perform baseline correction by - subtracting the mean of baseline values (‘mean’) - dividing by the mean of baseline values (‘ratio’) - dividing by the mean of baseline values and taking the log (‘logratio’) - subtracting the mean of baseline values followed by dividing by the mean of baseline values (‘percent’) - subtracting the mean of baseline values and dividing by the standard deviation of baseline values (‘zscore’) - dividing by the mean of baseline values, taking the log, and dividing by the standard deviation of log baseline values (‘zlogratio’)copy (
bool, optional) – Whether to return a new instance or modify in place.axis (
intortuple[int], optional)
- Returns:
data_scaled – Array of same shape as data after rescaling.
- Return type:
array