Standardize channel data.
This class scales data for each channel. It differs from scikit-learn
classes (e.g., sklearn.preprocessing.StandardScaler
) in that
it scales each channel by estimating μ and σ using data from all
time points and epochs, as opposed to standardizing each feature
(i.e., each time point for each channel) by estimating using μ and σ
using data from all epochs.
mne.Info
| None
The mne.Info
object with information about the sensors and methods of measurement. Only necessary if scalings
is a dict or None.
dict
, str
, default None
Scaling method to be applied to data channel wise.
if scalings is None (default), scales mag by 1e15, grad by 1e13, and eeg by 1e6.
if scalings is dict
, keys are channel types and values
are scale factors.
if scalings=='median'
,
sklearn.preprocessing.RobustScaler
is used (requires sklearn version 0.17+).
if scalings=='mean'
,
sklearn.preprocessing.StandardScaler
is used.
True
If True, center the data using mean (or median) before scaling. Ignored for channel-type scaling.
True
If True, scale the data to unit variance (scalings='mean'
),
quantile range (scalings='median
), or using channel type
if scalings
is a dict or None).
Methods
|
Standardize data across channels. |
|
Fit to data, then transform it. |
|
Get parameters for this estimator. |
|
Invert standardization of data across channels. |
|
Set the parameters of this estimator. |
|
Standardize data across channels. |
Standardize data across channels.
Scaler
The modified instance.
Examples using fit
:
Fit to data, then transform it.
Fits transformer to epochs_data and y and returns a transformed version of epochs_data.
array
, shape (n_epochs, n_channels, n_times)The data concatenated over channels.
Notes
This function makes a copy of the data before the operations and the memory usage may be large with big data.
Examples using fit_transform
:
Invert standardization of data across channels.
array
, shape (n_epochs, n_channels, n_times)The data.
array
, shape (n_epochs, n_channels, n_times)The data concatenated over channels.
Notes
This function makes a copy of the data before the operations and the memory usage may be large with big data.
Examples using inverse_transform
:
Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects
(such as pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each
component of a nested object.
dict
Parameters.
The object.
Standardize data across channels.
array
, shape (n_epochs, n_channels[, n_times])The data.
array
, shape (n_epochs, n_channels, n_times)The data concatenated over channels.
Notes
This function makes a copy of the data before the operations and the memory usage may be large with big data.
Examples using transform
:
mne.decoding.Scaler
#