mne.decoding.
Scaler
(info=None, scalings=None, with_mean=True, with_std=True)[source]¶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.
Parameters: | info : instance of Info | None
scalings : dict, string, defaults to None.
with_mean : boolean, True by default
with_std : boolean, True by default
|
---|
Methods
__hash__ () <==> hash(x) |
|
fit (epochs_data, y) |
Standardize data across channels. |
fit_transform (X[, y]) |
Fit to data, then transform it. |
get_params ([deep]) |
Get parameters for this estimator. |
inverse_transform (epochs_data) |
Invert standardization of data across channels. |
set_params (**params) |
Set the parameters of this estimator. |
transform (epochs_data[, y]) |
Standardize data across channels. |
__hash__
() <==> hash(x)¶fit
(epochs_data, y)[source]¶Standardize data across channels.
Parameters: | epochs_data : array, shape (n_epochs, n_channels, n_times)
y : array, shape (n_epochs,)
|
---|---|
Returns: | self : instance of Scaler
|
fit_transform
(X, y=None, **fit_params)[source]¶Fit to data, then transform it.
Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X.
Parameters: | X : numpy array of shape [n_samples, n_features]
y : numpy array of shape [n_samples]
|
---|---|
Returns: | X_new : numpy array of shape [n_samples, n_features_new]
|
get_params
(deep=True)[source]¶Get parameters for this estimator.
Parameters: | deep : boolean, optional
|
---|---|
Returns: | params : mapping of string to any
|
inverse_transform
(epochs_data)[source]¶Invert standardization of data across channels.
Parameters: | epochs_data : array, shape (n_epochs, n_channels, n_times)
|
---|---|
Returns: | X : array, shape (n_epochs, n_channels, n_times)
|
Notes
This function makes a copy of the data before the operations and the memory usage may be large with big data.
set_params
(**params)[source]¶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.
Returns
——-
self
transform
(epochs_data, y=None)[source]¶Standardize data across channels.
Parameters: | epochs_data : array, shape (n_epochs, n_channels, n_times)
y : None | array, shape (n_epochs,)
|
---|---|
Returns: | X : array, shape (n_epochs, n_channels, n_times)
|
Notes
This function makes a copy of the data before the operations and the memory usage may be large with big data.